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@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/sox-users