5

I have created 3 virtual sound devices using VAC and now i want to start 3 sox instances and make every instance use a separate sound device for output when playing a wav file.

Command sox.exe file.wav -d plays the file to the default sound device. How do i force it to use a different sound device ?

5

Try

sox d:\AUDIO\02.wav -t waveaudio 0
1
  • 7
    Might help to explain what these things are? What's the -t arguement? How do you decide what to put in the bits that go "wavetable 0" ? A fuller answer would be appreciated here – Journeyman Geek Dec 1 '16 at 0:27
2

Copied from here

waveaudio (optional)

MS-Windows native audio device driver. Examples:

 sox infile −t waveaudio
 sox infile −t waveaudio default
 sox infile −t waveaudio 1
 sox infile −t waveaudio "High Definition Audio Device ("

If the device name is omitted, -1, or default, then you get the ‘Microsoft Wave Mapper’ device. Wave Mapper means ‘use the system default audio devices’. You can control what ‘default’ means via the OS Control Panel.

If the device name given is some other number, you get that audio device by index; so recording with device name 0 would get the first input device (perhaps the microphone), 1 would get the second (perhaps line in), etc. Playback using 0 will get the first output device (usually the only audio device).

If the device name given is something other than a number, SoX tries to match it (maximum 31 characters) against the names of the available devices.

See also play(1), rec(1), and sox(1) −d.

I am not entirely certain where to view the list of devices, but I suspect in Windows 10 it's the list under Settings > Sound > Manage Sound Devices .

The device "Stereo Mix" seems to work for me, and it's listed on that screen. This records the "Stereo Mix" input to a file:

sox -t waveaudio "Stereo Mix" out.wav

Also note that you can run sox --help and it will list the available audio drivers. For me, that's only waveaudio, but maybe there are others. Idk.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.