mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-07 13:45:03 -05:00
surround: Fix two issues with the haas surround code.
1) Handle ID 0 is legal 2) Make sure handle is initialized before trying to memset its buffer Change-Id: I91db157863800c01dd9b92bc05a1df5c4fe0e95b
This commit is contained in:
parent
af24ff1fc3
commit
49a2953ade
1 changed files with 3 additions and 2 deletions
|
|
@ -78,7 +78,8 @@ static void surround_buffer_free(void)
|
||||||
|
|
||||||
static void dsp_surround_flush(void)
|
static void dsp_surround_flush(void)
|
||||||
{
|
{
|
||||||
memset(core_get_data(handle), 0, SURROUND_BUFSIZE);
|
if (handle >= 0)
|
||||||
|
memset(core_get_data(handle), 0, SURROUND_BUFSIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void surround_update_filter(unsigned int fout)
|
static void surround_update_filter(unsigned int fout)
|
||||||
|
|
@ -121,7 +122,7 @@ void dsp_surround_set_cutoff(int frq_l, int frq_h)
|
||||||
|
|
||||||
static void surround_set_stepsize(int surround_strength)
|
static void surround_set_stepsize(int surround_strength)
|
||||||
{
|
{
|
||||||
if (handle > 0)
|
if (handle >= 0)
|
||||||
dsp_surround_flush();
|
dsp_surround_flush();
|
||||||
|
|
||||||
switch(surround_strength)
|
switch(surround_strength)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue