summaryrefslogtreecommitdiffhomepage
path: root/src/audio
diff options
context:
space:
mode:
authorrealtradam <[email protected]>2023-05-27 13:06:06 -0400
committerrealtradam <[email protected]>2023-05-27 13:06:06 -0400
commitdaf092caa36cdeddde5b09c484487fe289ba7da7 (patch)
tree70a3ba12f13b759fc75a3a03bd8a0d3208fcf016 /src/audio
parentea25f27e08a37255af8d82b92c96166dc68abbc0 (diff)
downloadRodeoKit-daf092caa36cdeddde5b09c484487fe289ba7da7.tar.gz
RodeoKit-daf092caa36cdeddde5b09c484487fe289ba7da7.zip
remove incompatible function calls for emscripten
Diffstat (limited to 'src/audio')
-rw-r--r--src/audio/rodeo_audio.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/audio/rodeo_audio.c b/src/audio/rodeo_audio.c
index 25b5106..aeeef7a 100644
--- a/src/audio/rodeo_audio.c
+++ b/src/audio/rodeo_audio.c
@@ -113,14 +113,20 @@ irodeo_audio_channelPool_size_get(void)
void
rodeo_audio_master_volume_set(float volume_level)
{
+#ifndef __EMSCRIPTEN__
Mix_MasterVolume((int32_t)(volume_level * (float)MIX_MAX_VOLUME));
Mix_VolumeMusic((int32_t)(volume_level * (float)MIX_MAX_VOLUME));
+#endif
}
float
rodeo_audio_master_volume_get(void)
{
+#ifndef __EMSCRIPTEN__
return ((float)Mix_MasterVolume(-1)) / (float)MIX_MAX_VOLUME;
+#elif
+ return 0.0f
+#endif
}
/*