diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/imuse.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sound/imuse.cpp b/sound/imuse.cpp index 677a5c79f2..8e0e99e099 100644 --- a/sound/imuse.cpp +++ b/sound/imuse.cpp @@ -1255,6 +1255,9 @@ int IMuseInternal::get_music_volume() int IMuseInternal::set_music_volume(uint vol) { + // recalibrate from 0-255 range + vol = vol * 100 / 255; + if (vol > 100) vol = 100; else if (vol < 1) @@ -1267,6 +1270,10 @@ int IMuseInternal::set_music_volume(uint vol) int IMuseInternal::set_master_volume(uint vol) { int i; + + // recalibrate from 0-255 range + vol = vol * 127 / 255; + if (vol > 127) return -1; |