diff options
| author | Michael Sevakis <jethead71@rockbox.org> | 2011-06-29 06:37:04 +0000 |
|---|---|---|
| committer | Michael Sevakis <jethead71@rockbox.org> | 2011-06-29 06:37:04 +0000 |
| commit | a2b6703a369f6cdbfec1f150c408dadc877631fb (patch) | |
| tree | 3145a8c1372c44711d38feefeba39c7d4098f139 /apps/gui | |
| parent | 8411614b8a068a4f274c3841aa55aab1df1bc246 (diff) | |
| download | rockbox-a2b6703a369f6cdbfec1f150c408dadc877631fb.zip rockbox-a2b6703a369f6cdbfec1f150c408dadc877631fb.tar.gz rockbox-a2b6703a369f6cdbfec1f150c408dadc877631fb.tar.bz2 rockbox-a2b6703a369f6cdbfec1f150c408dadc877631fb.tar.xz | |
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/gui')
| -rw-r--r-- | apps/gui/wps.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/apps/gui/wps.c b/apps/gui/wps.c index e686fcc..cbf003a 100644 --- a/apps/gui/wps.c +++ b/apps/gui/wps.c @@ -121,9 +121,11 @@ char* wps_default_skin(enum screen_type screen) void pause_action(bool may_fade, bool updatewps) { +#if CONFIG_CODEC != SWCODEC if (may_fade && global_settings.fade_on_stop) fade(false, updatewps); else +#endif audio_pause(); if (global_settings.pause_rewind) { @@ -136,16 +138,22 @@ void pause_action(bool may_fade, bool updatewps) - global_settings.pause_rewind * 1000; audio_ff_rewind(newpos > 0 ? newpos : 0); } + + (void)may_fade; (void)updatewps; } void unpause_action(bool may_fade, bool updatewps) { +#if CONFIG_CODEC != SWCODEC if (may_fade && global_settings.fade_on_stop) fade(true, updatewps); else +#endif audio_resume(); + (void)may_fade; (void)updatewps; } +#if CONFIG_CODEC != SWCODEC void fade(bool fade_in, bool updatewps) { int fp_global_vol = global_settings.volume << 8; @@ -204,6 +212,7 @@ void fade(bool fade_in, bool updatewps) sound_set_volume(global_settings.volume); } } +#endif /* SWCODEC */ static bool update_onvol_change(enum screen_type screen) { @@ -569,7 +578,7 @@ static void play_hop(int direction) { #if CONFIG_CODEC == SWCODEC if(global_settings.beep) - pcmbuf_beep(1000, 150, 1500*global_settings.beep); + beep_play(1000, 150, 1500*global_settings.beep); #endif return; } @@ -1127,9 +1136,12 @@ long gui_wps_show(void) status_set_record(false); status_set_audio(false); #endif +#if CONFIG_CODEC != SWCODEC if (global_settings.fade_on_stop) fade(false, true); - +#else + audio_pause(); +#endif if (bookmark) bookmark_autobookmark(true); audio_stop(); |