Version
Code: v0.7.1-19-gec04a9c
Platform: Windows
Symptoms
If the game is started with --sound-options the volume level for effects does nothing. This applies to in-game spatial effects as well as menu "tick" when user navigates through options.
Code Analysis
The issue is observed in game running on Windows platform. However, all the platforms seem to be affected.
The "tick" in all menus
It's due to incorrect order of calls inside S3PlaySample() function.
It's due to incorrect transformation of volume specified in "Carmageddon decibels" (which are linear) into linear range <0.0f..1.0f>. Miniaudio ma_volume_db_to_linear() function expects value expressed in "real decibels" which are exponential. Using it for "Carmageddon decibels" produce either too loud or too quiet sound.
The best solution I have found is to recalculate "Carmageddon decibels" into <0.0f..1.0f> range explicitly
Version Code: v0.7.1-19-gec04a9c Platform: Windows
Symptoms If the game is started with
--sound-options
the volume level for effects does nothing. This applies to in-game spatial effects as well as menu "tick" when user navigates through options.Code Analysis The issue is observed in game running on Windows platform. However, all the platforms seem to be affected.
It's due to incorrect order of calls inside
S3PlaySample()
function.The following change addresses the issue:
It's due to incorrect transformation of volume specified in "Carmageddon decibels" (which are linear) into linear range <0.0f..1.0f>. Miniaudio
ma_volume_db_to_linear()
function expects value expressed in "real decibels" which are exponential. Using it for "Carmageddon decibels" produce either too loud or too quiet sound.The best solution I have found is to recalculate "Carmageddon decibels" into <0.0f..1.0f> range explicitly