mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-14 23:52:26 -05:00
Correctly enable crossfade mixmode only when not skipping tracks
manually. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9926 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
784b4c9a5b
commit
c9a1b4e9aa
1 changed files with 7 additions and 3 deletions
|
|
@ -65,7 +65,7 @@ static void (*position_callback)(size_t size) IDATA_ATTR;
|
||||||
|
|
||||||
/* Crossfade related state */
|
/* Crossfade related state */
|
||||||
static bool crossfade_enabled;
|
static bool crossfade_enabled;
|
||||||
static bool crossfade_mode;
|
static bool crossfade_mixmode;
|
||||||
static bool crossfade_active IDATA_ATTR;
|
static bool crossfade_active IDATA_ATTR;
|
||||||
static bool crossfade_init IDATA_ATTR;
|
static bool crossfade_init IDATA_ATTR;
|
||||||
|
|
||||||
|
|
@ -310,7 +310,11 @@ bool pcmbuf_crossfade_init(bool manual_skip)
|
||||||
pcmbuf_boost(true);
|
pcmbuf_boost(true);
|
||||||
|
|
||||||
/* Don't enable mix mode when skipping tracks manually. */
|
/* Don't enable mix mode when skipping tracks manually. */
|
||||||
crossfade_mode = manual_skip && global_settings.crossfade_fade_out_mixmode;
|
if (manual_skip)
|
||||||
|
crossfade_mixmode = false;
|
||||||
|
else
|
||||||
|
crossfade_mixmode = global_settings.crossfade_fade_out_mixmode;
|
||||||
|
|
||||||
crossfade_init = true;
|
crossfade_init = true;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -452,7 +456,7 @@ static bool pcmbuf_flush_fillpos(void)
|
||||||
static void crossfade_process_buffer(size_t fade_in_delay,
|
static void crossfade_process_buffer(size_t fade_in_delay,
|
||||||
size_t fade_out_delay, size_t fade_out_rem)
|
size_t fade_out_delay, size_t fade_out_rem)
|
||||||
{
|
{
|
||||||
if (!crossfade_mode)
|
if (!crossfade_mixmode)
|
||||||
{
|
{
|
||||||
/* Fade out the specified amount of the already processed audio */
|
/* Fade out the specified amount of the already processed audio */
|
||||||
size_t total_fade_out = fade_out_rem;
|
size_t total_fade_out = fade_out_rem;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue