forked from len0rd/rockbox
fix pbe/haas surround dsps: surround_enabled, redo flush functions.
surround_enabled was never true, end up dsp_surround_flush didn't work; Thats why a cracking noise occurs in right channel when moving track positions. redo pbe/surround flush in a much simpler way suits the current single buffer style. Change-Id: I394054ddfb164b82c90b3dcf49df4442db87d8d2
This commit is contained in:
parent
5732e3e32d
commit
30784cc262
2 changed files with 11 additions and 26 deletions
|
|
@ -96,18 +96,8 @@ static void dsp_surround_flush(void)
|
|||
if (!surround_enabled)
|
||||
return;
|
||||
|
||||
surround_buffer_get_data();
|
||||
|
||||
memset(b0,0,MAX_DLY/8 * sizeof(int32_t));
|
||||
memset(b2,0,MAX_DLY * sizeof(int32_t));
|
||||
memset(bb,0,MAX_DLY/4 * sizeof(int32_t));
|
||||
memset(hh,0,MAX_DLY/2 * sizeof(int32_t));
|
||||
memset(cl,0,MAX_DLY * sizeof(int32_t));
|
||||
b0_r = 0;b0_w = dly_size/8 - 1;
|
||||
b2_r = 0;b2_w = dly_size - 1;
|
||||
bb_r = 0;bb_w = dly_size/4 - 1;
|
||||
hh_r = 0;hh_w = dly_size/2 - 1;
|
||||
cl_r = 0;cl_w = dly_size - 1;
|
||||
unsigned int total_len = B0_DLY + B2_DLY + BB_DLY + HH_DLY + CL_DLY;
|
||||
memset(core_get_data(handle),0,sizeof(int32_t) * total_len);
|
||||
}
|
||||
|
||||
static void surround_update_filter(unsigned int fout)
|
||||
|
|
@ -186,6 +176,7 @@ void dsp_surround_enable(int var)
|
|||
core_free(handle);
|
||||
handle = -1;
|
||||
}
|
||||
surround_enabled = now_enabled;
|
||||
|
||||
struct dsp_config *dsp = dsp_get_config(CODEC_IDX_AUDIO);
|
||||
dsp_proc_enable(dsp, DSP_PROC_SURROUND, now_enabled);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue