2021-01-26 19:09 CET

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0006428Spring engineGeneralpublic2020-11-30 00:36
Reportermikeysee 
Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
StatusnewResolutionopen 
Product Version104.0 +git 
Target VersionFixed in Version 
Summary0006428: Handle audio device changes while engine is running
DescriptionTested while playing Beyond All Reason.

Turning on my bluetooth headphonees changes the audio device in windows, audio continues to come out of my speakers rather than the headphones.

Im running Windows 10
Steps To Reproduce1. Open Beyond All Reason, listen to audio coming out of speakers
2. Turn on bluetooth headphones or change default audio device in windows (see screenshot)
3. Notice audio continues to come out of speakers, doesnt change to the new default audio device.
Additional InformationOther apps such as Spotify or Chrome correctly change to the new audio device.

I have had a brief look at the code and see if it was something simple.

It looks like the engine uses OpenAL, unfortunately im not very familiar with it or CPP in general but from the looks of this Stack Overflow there is no obvious easy event to listen for in OpenAL: https://stackoverflow.com/questions/31171021/handling-device-change-in-openal

So im guessing an event would need to be listened for around here: https://github.com/spring/spring/blob/develop/rts/System/Sound/OpenAL/Sound.cpp#L62

Then the device would need to be re-initted somehow like it is done so here: https://github.com/spring/spring/blob/develop/rts/System/Sound/OpenAL/Sound.cpp#L363

Theres a lot of threading stuff going on in there so im really not sure.
Tagsaudio, device
Checked infolog.txt for ErrorsIrrelevant
Attached Files

-Relationships
+Relationships

-Notes
There are no notes attached to this issue.
+Notes

-Issue History
Date Modified Username Field Change
2020-11-30 00:36 mikeysee New Issue
2020-11-30 00:36 mikeysee File Added: pNf0JRy1WC.png
2020-11-30 00:36 mikeysee Tag Attached: audio
2020-11-30 00:36 mikeysee Tag Attached: device
+Issue History