Open AlertDOTEXE opened 8 years ago
This looks like an xaudio bug, because dsound and sdl2 drivers don't have problems switching audio devices. With xaudio, forcing a driver reinit (i.e. toggling fullscreen) updates the audio device.
There appears to be a difference in the way that DirectSound and XAudio2 enumerates audio devices, perhaps that's the issue:
RetroArch [INFO] :: DirectSound devices:
RetroArch [INFO] :: 0: Primary Sound Driver
RetroArch [INFO] :: 1: Realtek HD Audio 2nd output (Realtek High Definition Audio)
RetroArch [INFO] :: 2: Realtek Digital Output (Realtek High Definition Audio)
RetroArch [INFO] :: 3: Speakers (Realtek High Definition Audio)
XAudio2 devices:
0: Realtek HD Audio 2nd output (Realtek High Definition Audio)
1: Realtek Digital Output (Realtek High Definition Audio)
2: Speakers (Realtek High Definition Audio)
I can confirm this. This still happens on latest RetroArch nightly with Windows 10, using Amazon Echo as bluetooth speaker. As soon as you disconnect the bluetooth connection, RetroArch will crash.
This issue still occurs. Changed my TV input to watch some TV while playing and when I switched back, Retroarch was frozen. Using WASAPI audio driver. Windows 11
When utilizing two different audio devices and setting one to default, Retroarch will use it just fine. When changing the which audio device is default while running, two things may happen. Retroarch may not switch to the different default audio device, or Retroarch will crash altogether.
Specifically to me, I use bluetooth earphones on my laptop and most of the time it is the default audio device. When I turn them off, the laptop speakers automatically become default. When this happens while Retroarch is running, Retroarch will crash every time.
When having the laptop speakers as the default audio device initially, then run Retroarch and then change the default audio device by turning on my bluetooth earphones, Retroarch does not crash, but the audio does not transfer to the earphones even though it is the default audio device.