forked from len0rd/rockbox
Nitpick configuration code in a few DSP filters to fix some bugs
Most importantly is surround shouldn't operate in mono mode. Have it watch and (de)activate itself on relevant format changes as it should. Other changes to better handle buffer allocation failure. PBE was set internally at 100 by default; SBZ. Change-Id: I328e0b674e56751a255eae817d7892d685796b06
This commit is contained in:
parent
afbae177a1
commit
5eee28e37d
3 changed files with 125 additions and 84 deletions
|
@ -77,9 +77,10 @@ void dsp_afr_enable(int var)
|
|||
if (var == afr_strength)
|
||||
return; /* No setting change */
|
||||
|
||||
bool was_enabled = afr_strength > 0;
|
||||
afr_strength = var;
|
||||
|
||||
struct dsp_config *dsp = dsp_get_config(CODEC_IDX_AUDIO);
|
||||
bool was_enabled = dsp_proc_enabled(dsp, DSP_PROC_AFR);
|
||||
bool now_enabled = var > 0;
|
||||
|
||||
if (was_enabled == now_enabled && !now_enabled)
|
||||
|
@ -88,7 +89,6 @@ void dsp_afr_enable(int var)
|
|||
/* If changing status, enable or disable it; if already enabled push
|
||||
additional DSP_PROC_INIT messages with value = 1 to force-update the
|
||||
filters */
|
||||
struct dsp_config *dsp = dsp_get_config(CODEC_IDX_AUDIO);
|
||||
dsp_proc_enable(dsp, DSP_PROC_AFR, now_enabled);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue