View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0011957||MediaMonkey for Android||Playback||public||2014-03-18 13:51||2020-02-05 14:48|
|Target Version||2.1.0||Fixed in Version|
|Summary||0011957: Volume leveling is very limited for low-volume tracks|
|Description||The 90% default volume level when volume leveling is enabled doesn't give much headroom for low volume tracks, and so they continue to play quietly.|
Several ideas for a solution are proposed at: http://www.mediamonkey.com/forum/viewtopic.php?f=21&t=74554&start=15#p385682
|Tags||No tags attached.|
|Fixed in build|
||Please confirm whether this is being fixed as part of the playback-related improvements in 1.1.|
||No, it isn't part of new implementation because it isn't related. We still use the same Android library. We can use one of the simple method. Btw. BASS library that will be implemented to support FLAC and other files might have better possibilities to do this because it contains some basic DSP functions.|
Note: the root cause of this issue was tagged as obsolete at:
Which implies that it should be easily fixable??
It is still not fixable. I don't know why they marked it as obsolete.
We probably should use some approach using other audio engine than MediaPlayer - this is related to 0011907.
Recapitulation of current implementation. Based on 0008911:
Media player volume must be in range <0.0-1.0> so
if volume_leveling is disabled, then volume is 1.0 (100%) else (90% * multiplier):
Multiplier = exp( ln(10)*Leveling/20);
Volume = Multiplier*0.9;
plotted on google
volumeLevel -20.0 dB calcCoef 0.1 volume 0.09000000134110452
volumeLevel -15.0 dB calcCoef 0.17782794 volume 0.16004514545202256
volumeLevel -10.0 dB calcCoef 0.31622776 volume 0.2846049875020981
volumeLevel -5.0 dB calcCoef 0.56234133 volume 0.5061071991920472
volumeLevel -4.0 dB calcCoef 0.63095737 volume 0.5678616285324097
volumeLevel -3.0 dB calcCoef 0.70794576 volume 0.6371511876583099
volumeLevel -2.0 dB calcCoef 0.7943282 volume 0.7148953914642334
volumeLevel -1.0 dB calcCoef 0.8912509 volume 0.8021258175373077
volumeLevel 0.0 dB calcCoef 1.0 volume 0.9
volumeLevel 0.5 dB calcCoef 1.0592537 volume 0.9533283233642579
volumeLevel 1.0 dB calcCoef 1.1220185 volume 1.009816610813141 =>cut to 1.0
volumeLevel 2.0 dB calcCoef 1.2589254 volume 1.1330328941345216 =>cut to 1.0
It means that volume leveling takes effect only in range <~-20dB;1dB>.
Also -5.0 dB reduce volume to about 45% of original (90%) volume.
Is it possible to fix this yet? to review:
When volume leveling coefficient is negative: MM reduces the volume correctly
When volume leveling coefficient is positive: MM only increases the volume marginally
No new API for this yet, but in fact, I don't understand, why we just don't set the base volume to e.g 80% to have more space to increase the volume of silent tracks?
I know normal tracks will play more silently, but it would resolve the issue I think.
Wait I found https://developer.android.com/reference/android/media/audiofx/LoudnessEnhancer
maybe this can be useful for it.