1
0
mirror of https://github.com/blawar/ooot.git synced 2024-07-04 18:13:37 +00:00

Made the audio thread a variable on the stack

This commit is contained in:
DaMarkov 2022-03-02 00:13:53 +01:00
parent 4e64d4574a
commit e768f4fc0f

View File

@ -122,7 +122,7 @@ void audio_thread()
} }
} }
std::unique_ptr<std::thread> t1; std::thread t1;
void azi_init() void azi_init()
{ {
@ -163,7 +163,7 @@ void AudioMgr_Init(AudioMgr* audioMgr, void* stack, OSPri pri, OSId id, SchedCon
//AudioLoad_SetDmaHandler(DmaMgr_DmaHandler); //AudioLoad_SetDmaHandler(DmaMgr_DmaHandler);
Audio_InitSound(); Audio_InitSound();
t1 = std::make_unique<std::thread>(audio_thread); t1 = std::thread(audio_thread);
} }
void AudioMgr_Shutdown() void AudioMgr_Shutdown()
@ -176,6 +176,6 @@ void AudioMgr_Shutdown()
g_aziInit = false;//Thread closes now g_aziInit = false;//Thread closes now
if (t1->joinable()) if (t1.joinable())
t1->join(); t1.join();
} }