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();
|
||||
|
||||
ViewController::getInstance();
|
||||
CollectionSystemsManager::getInstance();
|
||||
|
||||
SystemScreensaver screensaver;
|
||||
MediaViewer mediaViewer;
|
||||
GuiLaunchScreen guiLaunchScreen;
|
||||
|
|
|
@ -119,6 +119,8 @@ void AudioManager::deinit()
|
|||
|
||||
SDL_CloseAudio();
|
||||
SDL_QuitSubSystem(SDL_INIT_AUDIO);
|
||||
|
||||
sAudioDevice = 0;
|
||||
}
|
||||
|
||||
void AudioManager::mixAudio(void* /*unused*/, Uint8* stream, int len)
|
||||
|
|
|
@ -1412,7 +1412,8 @@ void VideoFFmpegComponent::stopVideo()
|
|||
std::queue<AudioFrame>().swap(mAudioFrameQueue);
|
||||
|
||||
// Clear the audio buffer.
|
||||
AudioManager::getInstance().clearStream();
|
||||
if (AudioManager::sAudioDevice != 0)
|
||||
AudioManager::getInstance().clearStream();
|
||||
|
||||
if (mFormatContext) {
|
||||
av_frame_free(&mVideoFrame);
|
||||
|
|
Loading…
Reference in a new issue