| 153 | } |
| 154 | |
| 155 | void destroy() |
| 156 | { |
| 157 | s32 i; |
| 158 | |
| 159 | TFE_System::logWrite(LOG_MSG, "MidiPlayer", "Shutdown"); |
| 160 | // Destroy the thread before shutting down the Midi Device. |
| 161 | s_runMusicThread.store(false); |
| 162 | SDL_WaitThread(s_thread, &i); |
| 163 | |
| 164 | delete s_midiDevice; |
| 165 | |
| 166 | SDL_DestroyMutex(s_midiThreadMutex); |
| 167 | SDL_DestroyMutex(s_deviceChangeMutex); |
| 168 | } |
| 169 | |
| 170 | MidiDevice* getMidiDevice() |
| 171 | { |