summaryrefslogtreecommitdiff
path: root/apps/misc.c
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2011-06-29 06:37:04 +0000
committerMichael Sevakis <jethead71@rockbox.org>2011-06-29 06:37:04 +0000
commita2b6703a369f6cdbfec1f150c408dadc877631fb (patch)
tree3145a8c1372c44711d38feefeba39c7d4098f139 /apps/misc.c
parent8411614b8a068a4f274c3841aa55aab1df1bc246 (diff)
downloadrockbox-a2b6703a369f6cdbfec1f150c408dadc877631fb.tar.gz
rockbox-a2b6703a369f6cdbfec1f150c408dadc877631fb.zip
Commit FS#12150 - Fully-functional audio mixer - and finally whip old limitations about playback of voice and other sounds when paused. Channels are independent in state and amplitude. Fade on stop/pause is handled by the channel's volume control rather than global volume which means it now works from anywhere. Opens up the possibility of plugin sounds during music playback by merely adding an additional channel enum. If any PCM drivers were not properly modified, see one of the last comments in the task for a description of the simple change that is expected. Some params are tunable in firmware/export/pcm-mixer.h as well.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30097 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/misc.c')
-rw-r--r--apps/misc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/misc.c b/apps/misc.c
index 1f945c5431..a0817d7e27 100644
--- a/apps/misc.c
+++ b/apps/misc.c
@@ -297,12 +297,13 @@ static bool clean_shutdown(void (*callback)(void *), void *parameter)
297 splashf(0, "%s %s", str(LANG_WARNING_BATTERY_EMPTY), 297 splashf(0, "%s %s", str(LANG_WARNING_BATTERY_EMPTY),
298 str(LANG_SHUTTINGDOWN)); 298 str(LANG_SHUTTINGDOWN));
299 } 299 }
300 300#if CONFIG_CODEC != SWCODEC
301 if (global_settings.fade_on_stop 301 if (global_settings.fade_on_stop
302 && (audio_stat & AUDIO_STATUS_PLAY)) 302 && (audio_stat & AUDIO_STATUS_PLAY))
303 { 303 {
304 fade(false, false); 304 fade(false, false);
305 } 305 }
306#endif
306 307
307 if (batt_safe) /* do not save on critical battery */ 308 if (batt_safe) /* do not save on critical battery */
308 { 309 {
@@ -380,8 +381,10 @@ bool list_stop_handler(void)
380 { 381 {
381 if (!global_settings.party_mode) 382 if (!global_settings.party_mode)
382 { 383 {
384#if CONFIG_CODEC != SWCODEC
383 if (global_settings.fade_on_stop) 385 if (global_settings.fade_on_stop)
384 fade(false, false); 386 fade(false, false);
387#endif
385 bookmark_autobookmark(true); 388 bookmark_autobookmark(true);
386 audio_stop(); 389 audio_stop();
387 ret = true; /* bookmarking can make a refresh necessary */ 390 ret = true; /* bookmarking can make a refresh necessary */