diff --git a/config.hpp b/config.hpp index 57be9a7..c5f591f 100644 --- a/config.hpp +++ b/config.hpp @@ -20,6 +20,3 @@ #define SAMPLE_FMT SDL_SAMPLE_FMT #define USE_SDL #endif -#ifdef USE_SDL -#define LockAudioDevice SDL_LockAudioDevice -#endif diff --git a/playback.cpp b/playback.cpp index 608b45e..266bc27 100644 --- a/playback.cpp +++ b/playback.cpp @@ -97,7 +97,7 @@ void PlaybackInstance::LockAudioDevice() { } void PlaybackInstance::UnlockAudioDevice() { #ifdef USE_SDL - SDL_UnlockAudioDevice(device) + SDL_UnlockAudioDevice(device); #else audio_playback_mutex.unlock(); #endif diff --git a/playback.h b/playback.h index c7dd3e7..737d9de 100644 --- a/playback.h +++ b/playback.h @@ -247,10 +247,10 @@ private: std::string filePath; #ifndef USE_SDL std::mutex audio_playback_mutex; - std::atomic_bool audio_playback_paused; #endif - void LockAudioDevice(); - void UnlockAudioDevice(); + std::atomic_bool audio_playback_paused; + void LockAudioDevice(); + void UnlockAudioDevice(); std::atomic_bool running; std::atomic_bool file_changed; std::atomic_bool seeking;