diff options
author | Björn Stenberg <bjorn@haxx.se> | 2003-02-14 15:54:52 +0000 |
---|---|---|
committer | Björn Stenberg <bjorn@haxx.se> | 2003-02-14 15:54:52 +0000 |
commit | e2628d99315c315ba52c5b9abe5ba9d4017e8386 (patch) | |
tree | 9ebf62f6d43ef922dca791053ce713246c3e23aa /apps/settings.c | |
parent | 84eb9ce4a8a82fee0a85618aa4935aa55cad39fa (diff) | |
download | rockbox-e2628d99315c315ba52c5b9abe5ba9d4017e8386.tar.gz rockbox-e2628d99315c315ba52c5b9abe5ba9d4017e8386.zip |
Volume fade patch by Eric Linenberg
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3263 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/settings.c')
-rw-r--r-- | apps/settings.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/apps/settings.c b/apps/settings.c index cd5208591a..f6e92b001d 100644 --- a/apps/settings.c +++ b/apps/settings.c | |||
@@ -122,6 +122,7 @@ modified unless the header & checksum test fails. | |||
122 | 122 | ||
123 | 123 | ||
124 | Rest of config block, only saved to disk: | 124 | Rest of config block, only saved to disk: |
125 | 0xAE fade on pause/unpause/stop setting (bit 0) | ||
125 | 0xB0 peak meter clip hold timeout (bit 0-4) | 126 | 0xB0 peak meter clip hold timeout (bit 0-4) |
126 | 0xB1 peak meter release step size, peak_meter_dbfs (bit 7) | 127 | 0xB1 peak meter release step size, peak_meter_dbfs (bit 7) |
127 | 0xB2 peak meter min either in -db or in percent | 128 | 0xB2 peak meter min either in -db or in percent |
@@ -368,7 +369,8 @@ int settings_save( void ) | |||
368 | config_block[0x28]=(unsigned char)(global_settings.topruntime & 0xff); | 369 | config_block[0x28]=(unsigned char)(global_settings.topruntime & 0xff); |
369 | config_block[0x29]=(unsigned char)(global_settings.topruntime >> 8); | 370 | config_block[0x29]=(unsigned char)(global_settings.topruntime >> 8); |
370 | } | 371 | } |
371 | 372 | ||
373 | config_block[0xae] = (unsigned char)global_settings.fade_on_stop; | ||
372 | config_block[0xb0] = (unsigned char)global_settings.peak_meter_clip_hold | | 374 | config_block[0xb0] = (unsigned char)global_settings.peak_meter_clip_hold | |
373 | (global_settings.peak_meter_performance ? 0x80 : 0); | 375 | (global_settings.peak_meter_performance ? 0x80 : 0); |
374 | config_block[0xb1] = global_settings.peak_meter_release | | 376 | config_block[0xb1] = global_settings.peak_meter_release | |
@@ -651,6 +653,8 @@ void settings_load(void) | |||
651 | global_settings.topruntime = | 653 | global_settings.topruntime = |
652 | config_block[0x28] | (config_block[0x29] << 8); | 654 | config_block[0x28] | (config_block[0x29] << 8); |
653 | 655 | ||
656 | global_settings.fade_on_stop=config_block[0xae]; | ||
657 | |||
654 | global_settings.peak_meter_clip_hold = (config_block[0xb0]) & 0x1f; | 658 | global_settings.peak_meter_clip_hold = (config_block[0xb0]) & 0x1f; |
655 | global_settings.peak_meter_performance = | 659 | global_settings.peak_meter_performance = |
656 | (config_block[0xb0] & 0x80) != 0; | 660 | (config_block[0xb0] & 0x80) != 0; |
@@ -672,6 +676,9 @@ void settings_load(void) | |||
672 | if (config_block[0xb7] != 0xff) | 676 | if (config_block[0xb7] != 0xff) |
673 | global_settings.bidir_limit = config_block[0xb7]; | 677 | global_settings.bidir_limit = config_block[0xb7]; |
674 | 678 | ||
679 | if (config_block[0xae] != 0xff) | ||
680 | global_settings.fade_on_stop = config_block[0xae]; | ||
681 | |||
675 | memcpy(&global_settings.resume_first_index, &config_block[0xF4], 4); | 682 | memcpy(&global_settings.resume_first_index, &config_block[0xF4], 4); |
676 | memcpy(&global_settings.resume_seed, &config_block[0xF8], 4); | 683 | memcpy(&global_settings.resume_seed, &config_block[0xF8], 4); |
677 | 684 | ||
@@ -980,6 +987,8 @@ bool settings_load_config(char* file) | |||
980 | else if (!strcasecmp(name, "trickle charge")) | 987 | else if (!strcasecmp(name, "trickle charge")) |
981 | set_cfg_bool(&global_settings.trickle_charge, value); | 988 | set_cfg_bool(&global_settings.trickle_charge, value); |
982 | #endif | 989 | #endif |
990 | else if (!strcasecmp(name, "volume fade")) | ||
991 | set_cfg_bool(&global_settings.fade_on_stop, value); | ||
983 | } | 992 | } |
984 | 993 | ||
985 | close(fd); | 994 | close(fd); |
@@ -1057,6 +1066,7 @@ void settings_reset(void) { | |||
1057 | global_settings.runtime = 0; | 1066 | global_settings.runtime = 0; |
1058 | global_settings.topruntime = 0; | 1067 | global_settings.topruntime = 0; |
1059 | global_settings.cpu_sleep = true; | 1068 | global_settings.cpu_sleep = true; |
1069 | global_settings.fade_on_stop = true; | ||
1060 | } | 1070 | } |
1061 | 1071 | ||
1062 | 1072 | ||