diff options
| author | realtradam <[email protected]> | 2023-05-27 13:06:06 -0400 |
|---|---|---|
| committer | realtradam <[email protected]> | 2023-05-27 13:06:06 -0400 |
| commit | daf092caa36cdeddde5b09c484487fe289ba7da7 (patch) | |
| tree | 70a3ba12f13b759fc75a3a03bd8a0d3208fcf016 | |
| parent | ea25f27e08a37255af8d82b92c96166dc68abbc0 (diff) | |
| download | RodeoKit-daf092caa36cdeddde5b09c484487fe289ba7da7.tar.gz RodeoKit-daf092caa36cdeddde5b09c484487fe289ba7da7.zip | |
remove incompatible function calls for emscripten
| -rw-r--r-- | src/audio/rodeo_audio.c | 6 |
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 } /* |
