diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2002-12-05 13:09:51 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2002-12-05 13:09:51 +0000 |
commit | b8ff5f8971616f4b25c02cc79d9644d7df70d5c2 (patch) | |
tree | 967f11d5e095ea8b0fd7863237b55983bcd735b5 /apps/settings.c | |
parent | f4233e482dd34dd74bb9ce78f69f44cd22edbea6 (diff) |
Added MP3 buffer margin setting
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2939 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/settings.c')
-rw-r--r-- | apps/settings.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/apps/settings.c b/apps/settings.c index cd838b9627..2c97e20ba1 100644 --- a/apps/settings.c +++ b/apps/settings.c @@ -105,7 +105,7 @@ offset abs 0x22 0x36 <rec. quality (bit 0-2), source (bit 3-4), frequency (bit 5-7)> 0x23 0x37 <rec. left gain (bit 0-3)> 0x24 0x38 <rec. right gain (bit 0-3)> -0x25 0x39 <disk_spindown flag> +0x25 0x39 <disk poweroff flag (bit 0), MP3 buffer margin (bit 1-3)> 0x26 0x40 <runtime low byte> 0x27 0x41 <runtime high byte> 0x28 0x42 <topruntime low byte> @@ -344,7 +344,9 @@ int settings_save( void ) ((global_settings.rec_frequency & 7) << 5)); config_block[0x23] = (unsigned char)global_settings.rec_left_gain; config_block[0x24] = (unsigned char)global_settings.rec_right_gain; - config_block[0x25] = (unsigned char)global_settings.disk_poweroff & 1; + config_block[0x25] = (unsigned char) + ((global_settings.disk_poweroff & 1) | + ((global_settings.buffer_margin & 7) << 1)); { static long lasttime = 0; @@ -618,7 +620,10 @@ void settings_load(void) global_settings.rec_right_gain = config_block[0x24] & 0x0f; if (config_block[0x25] != 0xFF) + { global_settings.disk_poweroff = config_block[0x25] & 1; + global_settings.buffer_margin = (config_block[0x25] >> 1) & 7; + } if (config_block[0x27] != 0xff) global_settings.runtime = @@ -819,6 +824,7 @@ void settings_reset(void) { global_settings.resume_offset = -1; global_settings.disk_spindown = 5; global_settings.disk_poweroff = false; + global_settings.buffer_margin = 0; global_settings.browse_current = false; global_settings.play_selected = true; global_settings.peak_meter_release = 8; |