We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2acbcc2 commit 8619c2dCopy full SHA for 8619c2d
1 file changed
es-core/src/AudioManager.cpp
@@ -72,6 +72,9 @@ std::shared_ptr<AudioManager> & AudioManager::getInstance()
72
73
void AudioManager::init()
74
{
75
+ if(sInstance)
76
+ return;
77
+
78
if (SDL_InitSubSystem(SDL_INIT_AUDIO) != 0)
79
80
LOG(LogError) << "Error initializing SDL audio!\n" << SDL_GetError();
@@ -103,6 +106,9 @@ void AudioManager::init()
103
106
104
107
void AudioManager::deinit()
105
108
109
+ if(!sInstance)
110
111
112
//stop all playback
113
stop();
114
//completely tear down SDL audio. else SDL hogs audio resources and emulators might fail to start...
0 commit comments