mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 14:15:38 +00:00
Fixed an issue where the audio device was accessed after it had been closed.
This commit is contained in:
parent
f8e201d347
commit
c62a069448
|
@ -529,10 +529,8 @@ int main(int argc, char* argv[])
|
||||||
}
|
}
|
||||||
|
|
||||||
Window* window = Window::getInstance();
|
Window* window = Window::getInstance();
|
||||||
|
|
||||||
ViewController::getInstance();
|
ViewController::getInstance();
|
||||||
CollectionSystemsManager::getInstance();
|
CollectionSystemsManager::getInstance();
|
||||||
|
|
||||||
SystemScreensaver screensaver;
|
SystemScreensaver screensaver;
|
||||||
MediaViewer mediaViewer;
|
MediaViewer mediaViewer;
|
||||||
GuiLaunchScreen guiLaunchScreen;
|
GuiLaunchScreen guiLaunchScreen;
|
||||||
|
|
|
@ -119,6 +119,8 @@ void AudioManager::deinit()
|
||||||
|
|
||||||
SDL_CloseAudio();
|
SDL_CloseAudio();
|
||||||
SDL_QuitSubSystem(SDL_INIT_AUDIO);
|
SDL_QuitSubSystem(SDL_INIT_AUDIO);
|
||||||
|
|
||||||
|
sAudioDevice = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AudioManager::mixAudio(void* /*unused*/, Uint8* stream, int len)
|
void AudioManager::mixAudio(void* /*unused*/, Uint8* stream, int len)
|
||||||
|
|
|
@ -1412,6 +1412,7 @@ void VideoFFmpegComponent::stopVideo()
|
||||||
std::queue<AudioFrame>().swap(mAudioFrameQueue);
|
std::queue<AudioFrame>().swap(mAudioFrameQueue);
|
||||||
|
|
||||||
// Clear the audio buffer.
|
// Clear the audio buffer.
|
||||||
|
if (AudioManager::sAudioDevice != 0)
|
||||||
AudioManager::getInstance().clearStream();
|
AudioManager::getInstance().clearStream();
|
||||||
|
|
||||||
if (mFormatContext) {
|
if (mFormatContext) {
|
||||||
|
|
Loading…
Reference in a new issue