forked from len0rd/rockbox
Cleanup and simplify latest DSP code incarnation.
Some things can just be a bit simpler in handling the list of stages and some things, especially format change handling, can be simplified for each stage implementation. Format changes are sent through the configure() callback. Hide some internal details and variables from processing stages and let the core deal with it. Do some miscellaneous cleanup and keep things a bit better factored. Change-Id: I19dd8ce1d0b792ba914d426013088a49a52ecb7e
This commit is contained in:
parent
cdb71c707b
commit
78a45b47de
15 changed files with 516 additions and 543 deletions
|
@ -90,7 +90,7 @@ static void tone_process(struct dsp_proc_entry *this,
|
|||
struct dsp_buffer **buf_p)
|
||||
{
|
||||
struct dsp_buffer *buf = *buf_p;
|
||||
filter_process((void *)this->data, buf->p32, buf->remcount,
|
||||
filter_process((struct dsp_filter *)this->data, buf->p32, buf->remcount,
|
||||
buf->format.num_channels);
|
||||
}
|
||||
|
||||
|
@ -104,15 +104,17 @@ static intptr_t tone_configure(struct dsp_proc_entry *this,
|
|||
{
|
||||
case DSP_PROC_INIT:
|
||||
if (value != 0)
|
||||
break;
|
||||
break; /* Already enabled */
|
||||
|
||||
this->data = (intptr_t)&tone_filters[dsp_get_id(dsp)];
|
||||
this->process[0] = tone_process;
|
||||
this->process = tone_process;
|
||||
/* Fall-through */
|
||||
case DSP_FLUSH:
|
||||
filter_flush((struct dsp_filter *)this->data);
|
||||
break;
|
||||
}
|
||||
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Database entry */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue