ASIO backend, part 6

add support for handling device resets
this will be extended to the SDL and PortAudio backends soon
This commit is contained in:
tildearrow 2025-10-25 18:40:02 -05:00
parent 3edf62fc5c
commit db2f368813
7 changed files with 85 additions and 1 deletions

View file

@ -4333,6 +4333,17 @@ bool FurnaceGUI::loop() {
});
}
// recover from audio resets
TAAudioDeviceStatus audioStatus=e->getAudioDeviceStatus();
if (audioStatus!=TA_AUDIO_DEVICE_OK) {
logI("audio device reset!");
e->acceptAudioDeviceStatus();
if (!e->switchMaster(false)) {
showError(_("audio device has reset or has been disconnected! check audio settings."));
}
}
// recover from dead graphics
if (rend->isDead() || killGraphics) {
killGraphics=false;