summaryrefslogtreecommitdiff
path: root/lib/rbcodec/dsp/dsp_sample_io.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rbcodec/dsp/dsp_sample_io.c')
-rw-r--r--lib/rbcodec/dsp/dsp_sample_io.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/rbcodec/dsp/dsp_sample_io.c b/lib/rbcodec/dsp/dsp_sample_io.c
index af3a424aa0..8a0d5da7cc 100644
--- a/lib/rbcodec/dsp/dsp_sample_io.c
+++ b/lib/rbcodec/dsp/dsp_sample_io.c
@@ -36,6 +36,13 @@ static void format_change_set(struct sample_io_data *this)
36 this->format_dirty = 1; 36 this->format_dirty = 1;
37} 37}
38 38
39void dsp_sample_io_init(struct sample_io_data *this, unsigned int dsp_id)
40{
41 this->output_sampr = DSP_OUT_DEFAULT_HZ;
42 dsp_sample_input_init(this, dsp_id);
43 dsp_sample_output_init(this);
44}
45
39bool dsp_sample_io_configure(struct sample_io_data *this, 46bool dsp_sample_io_configure(struct sample_io_data *this,
40 unsigned int setting, 47 unsigned int setting,
41 intptr_t *value_p) 48 intptr_t *value_p)
@@ -44,12 +51,6 @@ bool dsp_sample_io_configure(struct sample_io_data *this,
44 51
45 switch (setting) 52 switch (setting)
46 { 53 {
47 case DSP_INIT:
48 this->output_sampr = DSP_OUT_DEFAULT_HZ;
49 dsp_sample_input_init(this, value);
50 dsp_sample_output_init(this);
51 break;
52
53 case DSP_RESET: 54 case DSP_RESET:
54 /* Reset all sample descriptions to default */ 55 /* Reset all sample descriptions to default */
55 format_change_set(this); 56 format_change_set(this);