summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Everton <dan@iocaine.org>2007-10-13 23:01:10 +0000
committerDan Everton <dan@iocaine.org>2007-10-13 23:01:10 +0000
commit003a4a11c4f4a9d8c4e16a29665064ebbb365e34 (patch)
treedf4b8d5931a9c9f36e7f881f3631179d3aa0e027
parentcb4186c989d74696c77518e7e53d4bc02d587eec (diff)
downloadrockbox-003a4a11c4f4a9d8c4e16a29665064ebbb365e34.tar.gz
rockbox-003a4a11c4f4a9d8c4e16a29665064ebbb365e34.tar.bz2
rockbox-003a4a11c4f4a9d8c4e16a29665064ebbb365e34.zip
Make the volume range in the simulator match the target being simulated.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15100 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/sound.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/firmware/sound.c b/firmware/sound.c
index 6d510cc896..701b008fc3 100644
--- a/firmware/sound.c
+++ b/firmware/sound.c
@@ -47,7 +47,7 @@ extern unsigned shadow_codec_reg0;
#ifdef SIMULATOR
/* dummy for sim */
const struct sound_settings_info audiohw_settings[] = {
- [SOUND_VOLUME] = {"dB", 0, 1, -40, 6, -25},
+ [SOUND_VOLUME] = {"dB", 0, 1, VOLUME_MIN / 10, VOLUME_MAX / 10, -25},
[SOUND_BASS] = {"dB", 0, 1, -24, 24, 0},
[SOUND_TREBLE] = {"dB", 0, 1, -24, 24, 0},
[SOUND_BALANCE] = {"%", 0, 1,-100, 100, 0},
@@ -666,7 +666,8 @@ void sound_set_superbass(int value)
int sim_volume;
void sound_set_volume(int value)
{
- sim_volume =128*(value +40)/46; /* 128 is SDL_MIX_MAXVOLUME */
+ /* 128 is SDL_MIX_MAXVOLUME */
+ sim_volume = 128 * (value - VOLUME_MIN / 10) / ((VOLUME_MAX - VOLUME_MIN) / 10);
}
void sound_set_balance(int value)