From b4aa0a2093cf4f8419136e1e95c1cf4610d77b52 Mon Sep 17 00:00:00 2001 From: Gleb Mazovetskiy Date: Sun, 7 Nov 2021 04:37:35 +0000 Subject: [PATCH] Open music assets with threadsafe=true Missed during #3354 --- Source/sound.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Source/sound.cpp b/Source/sound.cpp index d69821d21..479c9db80 100644 --- a/Source/sound.cpp +++ b/Source/sound.cpp @@ -240,7 +240,12 @@ void music_start(uint8_t nTrack) else trackPath = MusicTracks[nTrack]; - SDL_RWops *handle = OpenAsset(trackPath); +#ifdef DISABLE_STREAMING_MUSIC + const bool threadsafe = false; +#else + const bool threadsafe = true; +#endif + SDL_RWops *handle = OpenAsset(trackPath, threadsafe); if (handle != nullptr) { LoadMusic(handle); if (!music->open()) {