mirror of
https://github.com/moonlight-stream/moonlight-qt
synced 2024-12-14 21:32:27 +00:00
parent
4ae39f2bd5
commit
6c0983d77c
1 changed files with 6 additions and 0 deletions
|
@ -88,6 +88,12 @@ void* SdlAudioRenderer::getAudioBuffer(int*)
|
|||
|
||||
bool SdlAudioRenderer::submitAudio(int bytesWritten)
|
||||
{
|
||||
// Our device may enter a permanent error status upon removal, so we need
|
||||
// to recreate the audio device to pick up the new default audio device.
|
||||
if (SDL_GetAudioDeviceStatus(m_AudioDevice) == SDL_AUDIO_STOPPED) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (bytesWritten == 0) {
|
||||
// Nothing to do
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue