Skip to content
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,14 @@ if(AUDIO_BACKEND STREQUAL "openal")
set(AUDIO_LIBRARIES "${OPENAL_LIBRARY}")
endif()
elseif(AUDIO_BACKEND STREQUAL "miniaudio")
target_include_directories(butterscotch PUBLIC vendor/miniaudio)
target_include_directories(butterscotch SYSTEM PUBLIC vendor/miniaudio)
target_include_directories(butterscotch PUBLIC src/audio/miniaudio)
add_compile_definitions(USE_MINIAUDIO)
if (NOT WIN32)
set(AUDIO_LIBRARIES pthread)
endif()
elseif(AUDIO_BACKEND STREQUAL "web")
target_include_directories(butterscotch PUBLIC vendor/miniaudio)
target_include_directories(butterscotch SYSTEM PUBLIC vendor/miniaudio)
target_include_directories(butterscotch PUBLIC src/audio/web)
target_include_directories(butterscotch PUBLIC src/audio/miniaudio)
add_compile_definitions(USE_WEB_AUDIO)
Expand Down
2 changes: 1 addition & 1 deletion src/audio/miniaudio/ma_audio_system.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ static int32_t maPlaySound(AudioSystem* audio, int32_t soundIndex, int32_t prior
}
slot->ownsDecoder = true;

result = ma_sound_init_from_data_source(&ma->engine, &slot->decoder, 0, &ma->listenerGroups[0], &slot->maSound);
result = ma_sound_init_from_data_source(&ma->engine, &slot->decoder, 0, &ma->listenerGroups[0], nullptr, &slot->maSound);
if (result != MA_SUCCESS) {
fprintf(stderr, "Audio: Failed to init sound from decoder for '%s' (error %d)\n", sound->name, result);
ma_decoder_uninit(&slot->decoder);
Expand Down
2 changes: 1 addition & 1 deletion src/audio/web/web_audio_system.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ static int32_t webPlaySound(AudioSystem* audio, int32_t soundIndex, int32_t prio
}
slot->ownsDecoder = true;

result = ma_sound_init_from_data_source(&ma->engine, &slot->decoder, 0, nullptr, &slot->maSound);
result = ma_sound_init_from_data_source(&ma->engine, &slot->decoder, 0, nullptr, nullptr, &slot->maSound);
if (result != MA_SUCCESS) {
fprintf(stderr, "Audio: Failed to init sound from decoder for '%s' (error %d)\n", sound->name, result);
ma_decoder_uninit(&slot->decoder);
Expand Down
Loading
Loading