Fix Linux build
Some checks failed
Build / build-gentoo (push) Successful in 1m6s
Build / build-appimage (push) Failing after 9m55s
Build / build-android (push) Has been cancelled

This commit is contained in:
Zachary Hall 2024-10-20 10:29:55 -07:00
parent 165b005aeb
commit 0a5bc4e779
3 changed files with 4 additions and 7 deletions

View file

@ -20,6 +20,3 @@
#define SAMPLE_FMT SDL_SAMPLE_FMT #define SAMPLE_FMT SDL_SAMPLE_FMT
#define USE_SDL #define USE_SDL
#endif #endif
#ifdef USE_SDL
#define LockAudioDevice SDL_LockAudioDevice
#endif

View file

@ -97,7 +97,7 @@ void PlaybackInstance::LockAudioDevice() {
} }
void PlaybackInstance::UnlockAudioDevice() { void PlaybackInstance::UnlockAudioDevice() {
#ifdef USE_SDL #ifdef USE_SDL
SDL_UnlockAudioDevice(device) SDL_UnlockAudioDevice(device);
#else #else
audio_playback_mutex.unlock(); audio_playback_mutex.unlock();
#endif #endif

View file

@ -247,8 +247,8 @@ private:
std::string filePath; std::string filePath;
#ifndef USE_SDL #ifndef USE_SDL
std::mutex audio_playback_mutex; std::mutex audio_playback_mutex;
std::atomic_bool audio_playback_paused;
#endif #endif
std::atomic_bool audio_playback_paused;
void LockAudioDevice(); void LockAudioDevice();
void UnlockAudioDevice(); void UnlockAudioDevice();
std::atomic_bool running; std::atomic_bool running;