| 368 | } |
| 369 | |
| 370 | ~SDLRawBackend() override |
| 371 | { |
| 372 | // Lock the device and stop any outstanding music threads to ensure everything is dead |
| 373 | // before destroying the device |
| 374 | SDL_LockAudioDevice(devID); |
| 375 | SDL_PauseAudioDevice(devID, 1); |
| 376 | this->stopMusic(); |
| 377 | SDL_UnlockAudioDevice(devID); |
| 378 | SDL_CloseAudioDevice(devID); |
| 379 | SDL_QuitSubSystem(SDL_INIT_AUDIO); |
| 380 | } |
| 381 | |
| 382 | virtual const AudioFormat &getPreferredFormat() { return preferred_format; } |
| 383 |