From 0a5bc4e77976151300296149ac226d0ae1afd1b5 Mon Sep 17 00:00:00 2001 From: Zachary Hall Date: Sun, 20 Oct 2024 10:29:55 -0700 Subject: [PATCH] Fix Linux build --- config.hpp | 3 --- playback.cpp | 2 +- playback.h | 6 +++--- 3 files changed, 4 insertions(+), 7 deletions(-) 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;