TooTallNate / node-speaker

Output PCM audio data to the speakers
655 stars 147 forks source link

Change audio output device on Win32 Backend #162

Open ssarpv opened 3 years ago

ssarpv commented 3 years ago

I'm trying to create a soundboard kind of application and in order for me to do it I need to play audio to a speaker that is not the default/currently used speaker in Windows 10. However, looking at the documentation, I am told to use

device - The name of the playback device. E.g. 'hw:0,0' for first device of first sound card or 'hw:1,0' for first device of second sound card. Defaults to null which will pick the default device.

However doing so does not change the output device, I have tried to change both values but no luck. I believe this option is for ALSA only but is there any way to use this on the Win32 backend?

nacgarg commented 3 years ago

I created a pull request a few months ago to add this functionality: https://github.com/TooTallNate/node-speaker/pull/154