diff options
Diffstat (limited to 'apps/codec_thread.c')
-rw-r--r-- | apps/codec_thread.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/apps/codec_thread.c b/apps/codec_thread.c index dc6533dfc9..21d55a7779 100644 --- a/apps/codec_thread.c +++ b/apps/codec_thread.c | |||
@@ -168,7 +168,7 @@ static void* codec_get_buffer(size_t *size) | |||
168 | return &codecbuf[codec_size]; | 168 | return &codecbuf[codec_size]; |
169 | } | 169 | } |
170 | 170 | ||
171 | static bool codec_pcmbuf_insert_callback( | 171 | static void codec_pcmbuf_insert_callback( |
172 | const void *ch1, const void *ch2, int count) | 172 | const void *ch1, const void *ch2, int count) |
173 | { | 173 | { |
174 | const char *src[2] = { ch1, ch2 }; | 174 | const char *src[2] = { ch1, ch2 }; |
@@ -181,14 +181,14 @@ static bool codec_pcmbuf_insert_callback( | |||
181 | 181 | ||
182 | /* Prevent audio from a previous track from playing */ | 182 | /* Prevent audio from a previous track from playing */ |
183 | if (ci.new_track || ci.stop_codec) | 183 | if (ci.new_track || ci.stop_codec) |
184 | return true; | 184 | return; |
185 | 185 | ||
186 | while ((dest = pcmbuf_request_buffer(&out_count)) == NULL) | 186 | while ((dest = pcmbuf_request_buffer(&out_count)) == NULL) |
187 | { | 187 | { |
188 | cancel_cpu_boost(); | 188 | cancel_cpu_boost(); |
189 | sleep(1); | 189 | sleep(1); |
190 | if (ci.seek_time || ci.new_track || ci.stop_codec) | 190 | if (ci.seek_time || ci.new_track || ci.stop_codec) |
191 | return true; | 191 | return; |
192 | } | 192 | } |
193 | 193 | ||
194 | /* Get the real input_size for output_size bytes, guarding | 194 | /* Get the real input_size for output_size bytes, guarding |
@@ -196,7 +196,7 @@ static bool codec_pcmbuf_insert_callback( | |||
196 | inp_count = dsp_input_count(ci.dsp, out_count); | 196 | inp_count = dsp_input_count(ci.dsp, out_count); |
197 | 197 | ||
198 | if (inp_count <= 0) | 198 | if (inp_count <= 0) |
199 | return true; | 199 | return; |
200 | 200 | ||
201 | /* Input size has grown, no error, just don't write more than length */ | 201 | /* Input size has grown, no error, just don't write more than length */ |
202 | if (inp_count > count) | 202 | if (inp_count > count) |
@@ -205,14 +205,12 @@ static bool codec_pcmbuf_insert_callback( | |||
205 | out_count = dsp_process(ci.dsp, dest, src, inp_count); | 205 | out_count = dsp_process(ci.dsp, dest, src, inp_count); |
206 | 206 | ||
207 | if (out_count <= 0) | 207 | if (out_count <= 0) |
208 | return true; | 208 | return; |
209 | 209 | ||
210 | pcmbuf_write_complete(out_count); | 210 | pcmbuf_write_complete(out_count); |
211 | 211 | ||
212 | count -= inp_count; | 212 | count -= inp_count; |
213 | } | 213 | } |
214 | |||
215 | return true; | ||
216 | } /* codec_pcmbuf_insert_callback */ | 214 | } /* codec_pcmbuf_insert_callback */ |
217 | 215 | ||
218 | static void codec_set_elapsed_callback(unsigned long value) | 216 | static void codec_set_elapsed_callback(unsigned long value) |