Audio out remains on device used when blender started (WASAPI only) #93312
EDITED TO ADD: problem goes away with SDL in audio preferences. Problem exists with WASAPI.
Operating system: Windows 10
Graphics card: RTX 3090 EVGA
Broken: 3.0.0 b
Short description of error
Using audio with Blender, when changing output device, such as plugging-in headphones after using speakers or vice-versa, audio remains on original device. Closing and restarting Blender then plays on new device. May not be a bug, but is a nuisance.
Exact steps for others to reproduce the error
add audio in video sequencer. Play. works ok. change audio device. plays on original device.
Changed status from 'Needs Triage' to: 'Needs User Info'
By original device do you mean, that sound will play on original channed on same sound card or are you plugging in new soundcard, but audio is playing on original one?
I don't think I have card that switches channels here to check, second case is expected I would say.
Not channels or cards but audio output devices, as in speakers vs headphones. Normal behavior in windows is to change audio device when a new device is plugged in or unplugged (mainly wired headphones plugged in, or bluetooth connected). Device can also be changed manually in windows volume control or audio settings. in All those cases, Blender continues to play in the "old" device rather than the "new". This works correctly (starts playing in new device) when using SDL in Blender's sound options. I was using WASAPI (by default, never looked at these settings before).
Thanks for your time.
Changed status from 'Needs User Info' to: 'Confirmed'
Thanks for clarification. I don't know exactly how outputs are structured in this case, just that there could be distinction.
I can confirm that when I connect new sound card, in WASAPI it plays on original sound output, with SDL it does switch to new output. This is likely same configuration as reported.
@neXyon Can you check?
OpenAL has the same behavior btw, but yes, SDL always switches to the default device. I implemented this in this build, can you please try it @leviny ? https://builder.blender.org/download/patch/blender-3.1.0-alpha+master-D13823.5bcc14dc05a3-windows.amd64-release.zip
So with SDL the behavior is still "correct" (meaning the audio device changes when I connect or disconnect a bluetooth speaker, for example.) With OpenAL (as well as OpenAL+soft which was also an option) and with WASAPI it correctly switches to windows speakers when I disconnect the bluetooth speaker, but does not switch back to the bluetooth speaker when I reconnect it (keeps playing on windows speakers even though all other audio in windows goes to the bluetooth.)
You can test this easily with a blend file that has audio in the video sequencer, then use windows settings to connect and disconnect a bluetooth device, or plug a wired headset in and out and see if the audio follows. Or I'm happy to do more testing. Thanks for working on this.
And you tried this with the build that I linked in the last comment that you downloaded, unpacked and then ran the blender.exe in the unpacked folder? Because there it works for me and if it doesn't for you, I'm not sure how to reproduce your issue.
Yes, on the build you linked. If you play audio on speakers then stop the play, connect a bluetooth headset, press play and the audio should play in the headset. Disconnect the headset, the audio should play in the speakers. For me, works in SDL, not in WASAPI or openAL. If this works for you, the problem may be on my side.
It works for me (with the headphone jack) and another person that tested with a bluetooth headset. No idea what's wrong there, sorry.
Here's another build that fixes a bug in the last one that WASAPI didn't work properly, when the audio device was switched while playback was stopped: https://builder.blender.org/download/patch/blender-3.1.0-alpha+master-D13823.45894ba931ad-windows.amd64-release.zip
I pushed a fix for this as part of
2a095d8bfe. It works for everyone who tested it, except you @leviny. I'll mark this as resolved for now, if the problem still persists with the next release of Blender, please reopen this report, or open a new one. If it is fixed, I'd also love to know! Cheers
In the latest build linked above, works perfectly in SDL and WASPI. Doesn't work in OpenAL. Tested by connecting and disconnecting wired headset and bluetooth headset, while playing as well as stopping and restarting play after connecting/disconnecting.
Thanks for fixing it!
No due date set.
No dependencies set.
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?