sox-users@lists.sourceforge.net unofficial mirror
 help / color / mirror / code / Atom feed
From: Jeremy Nicoll - ml sox users <jn.ml.sxu.88@wingsandbeaks.org.uk>
To: sox-users@lists.sourceforge.net
Subject: Re: basic help with SoX on windows 10
Date: Thu, 31 Oct 2019 13:09:03 +0000	[thread overview]
Message-ID: <9bef1b4b815827440c627111d2073689@wingsandbeaks.org.uk> (raw)
In-Reply-To: <c8db97d4337ef7f50b39de67b15c58f0@wingsandbeaks.org.uk>

On 2019-10-30 19:18, Jeremy Nicoll - ml sox users wrote:

> Hmm.  If I try that I get:
> 
>   FAIL sox: Sorry, there is no default audio device configured
> 
> and - depite trying this & that, and googling I've not been able to 
> make
> it work.   A few posts suggest that it might work on the earlier 
> version
> of sox, v14-4-1.  I've not tried.  Running all sorts of commands, with
> -V4 (verbose output) I just see things like:
> 
>   sox.exe DBUG sox: Looking for a default device: trying format 
> `waveaudio'
>   sox.exe DBUG waveaudio: waveOutOpen(QUERY: Dev -1 0Hz 0Ch 8Prec
> 8Wide) returned 32
>   sox.exe FAIL sox: Sorry, there is no default audio device configured



Trying again today, I've found a command that works:

   play.exe -n -c1 -t waveaudio synth sin %-12 sin %-9 sin %-5 sin %-2 
fade h 0.1 1 0.1


It doesn't work with   -t waveaudio 0
                   or   -t waveaudio 1
                   or   -t waveaudio -1


If I ask sox to be very verbose ( -V6 ) in the command that works, ie by

   play.exe -V6 -n -c1 -t waveaudio synth sin %-12 sin %-9 sin %-5 sin 
%-2 fade h 0.1 1 0.1

some of the verbose output says:

   play.exe DBUG waveaudio: waveOutOpen(QUERY: Dev -1 48000Hz 1Ch 32Prec 
32Wide) returned 0
   play.exe INFO waveaudio: Using default output device at 48000Hz 1Ch 
32Prec 32Wide.

which is interesting because the "waveOutOpen(QUERY: Dev -1" part 
suggests that internally
sox was able to find out what the 'default' device was by referring to 
device id -1, this
time, but in stuff I did yesterday it kept showing

  sox.exe DBUG sox: Looking for a default device: trying format 
`waveaudio'
  sox.exe DBUG waveaudio: waveOutOpen(QUERY: Dev -1 0Hz 0Ch 8Prec 8Wide) 
returned 32

where the same device number didn't seem to work.


I also found a way to make sox show me what devices it was considering 
when looking for a
default waveaudio device.  By telling it to show me lots of debugging 
output (with -V6) &
asking for a named audio device that it won't find

  sox.exe -V6 -n -t waveaudio jfhgfgfjg

some of the output contained:

  sox.exe DBUG waveaudio: Enumerating output device -1: "Microsoft Sound 
Mapper"
  sox.exe DBUG waveaudio: Enumerating output device  0: "Speakers (USB 
Audio CODEC )"
  sox.exe DBUG waveaudio: Enumerating output device  1: "Speakers 
(Realtek High Definiti"
  sox.exe FAIL formats: can't open output file `jfhgfgfjg': The requested 
WaveAudio device was not found.

So... you'd think if it lists three named devices, one should be able to 
specify any
of those by name?  But I was not able to do that:

  C:\>play.exe -V6 -n -c1 -t waveaudio "Microsoft Sound Mapper" synth sin 
%-12 sin %-9 sin %-5 sin %-2 fade h 0.1 1 0.1
  play.exe DBUG sox: Looking for a default device: trying format 
`waveaudio'
  play.exe DBUG waveaudio: waveOutOpen(QUERY: Dev -1 0Hz 0Ch 8Prec 8Wide) 
returned 32
  play.exe FAIL sox: Sorry, there is no default audio device configured

  C:\>play.exe -V6 -n -c1 -t waveaudio "Speakers (USB Audio CODEC )" 
synth sin %-12 sin %-9 sin %-5  sin %-2 fade h 0.1 1 0.1
  play.exe DBUG sox: Looking for a default device: trying format 
`waveaudio'
  play.exe DBUG waveaudio: waveOutOpen(QUERY: Dev -1 0Hz 0Ch 8Prec 8Wide) 
returned 32
  play.exe FAIL sox: Sorry, there is no default audio device configured

  C:\>play.exe -V6 -n -c1 -t waveaudio "Speakers (Realtek High Definiti" 
synth sin %-12 sin %-9 sin  %-5 sin %-2 fade h 0.1 1 0.1
  play.exe DBUG sox: Looking for a default device: trying format 
`waveaudio'
  play.exe DBUG waveaudio: waveOutOpen(QUERY: Dev -1 0Hz 0Ch 8Prec 8Wide) 
returned 32
  play.exe FAIL sox: Sorry, there is no default audio device configured



I also found in a MSDN programmers' info page:

https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-sounddevice

a way of listing audio devices on my pc.   When I run something based on 
that
I see three devices, but I don't see the names that sox was able to 
find.  I
see:


1)      Caption: Realtek High Definition Audio
     Description: Realtek High Definition Audio
        DeviceID: 
HDAUDIO\FUNC_01&VEN_10EC&DEV_0269&SUBSYS_144DC0D8&REV_1002\4&1391229C&0&0001
    Manufacturer: Realtek
            Name: Realtek High Definition Audio
     PNPDeviceID: 
HDAUDIO\FUNC_01&VEN_10EC&DEV_0269&SUBSYS_144DC0D8&REV_1002\4&1391229C&0&0001
    Product Name: Realtek High Definition Audio
          Status: OK
      StatusInfo: 3

2)      Caption: Intel(R) Display Audio
     Description: Intel(R) Display Audio
        DeviceID: 
HDAUDIO\FUNC_01&VEN_8086&DEV_2806&SUBSYS_144DC0D8&REV_1000\4&1391229C&0&0301
    Manufacturer: Intel(R) Corporation
            Name: Intel(R) Display Audio
     PNPDeviceID: 
HDAUDIO\FUNC_01&VEN_8086&DEV_2806&SUBSYS_144DC0D8&REV_1000\4&1391229C&0&0301
    Product Name: Intel(R) Display Audio
          Status: OK
      StatusInfo: 3

3)      Caption: USB Audio Device
     Description: USB Audio Device
        DeviceID: USB\VID_08BB&PID_2902&MI_00\7&173E1977&1&0000
    Manufacturer: (Generic USB Audio)
            Name: USB Audio Device
     PNPDeviceID: USB\VID_08BB&PID_2902&MI_00\7&173E1977&1&0000
    Product Name: USB Audio Device
          Status: OK
      StatusInfo: 3

which is not helpful.  For a start the device numbers -1, 0, 1 don't 
seem to
correspond.

When I use the Control Panel - Sound configuration options, it shows 
devices
with names like "Realtek High Definition Audio", "USB Audio Device" etc 
which
correspond to the ones in this list.  But the names are not precisely 
the same
as the enumerated names that sox showed when trying to make sense of 
jfhgfgfjg.


-- 
Jeremy Nicoll - my opinions are my own


_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

      reply	other threads:[~2019-10-31 13:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-29  8:56 basic help with SoX on windows 10 Nils Wallgren
2019-10-29 12:36 ` Jeremy Nicoll - ml sox users
2019-10-29 13:30   ` Nils Wallgren
2019-10-29 22:44     ` Jeremy Nicoll - ml sox users
2019-10-30 14:42       ` Nils Wallgren
2019-10-30 19:18         ` Jeremy Nicoll - ml sox users
2019-10-31 13:09           ` Jeremy Nicoll - ml sox users [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.sourceforge.net/lists/listinfo/sox-users

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9bef1b4b815827440c627111d2073689@wingsandbeaks.org.uk \
    --to=sox-users@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/sox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).