summaryrefslogtreecommitdiffstats
path: root/apps/playback.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/playback.c')
-rw-r--r--apps/playback.c26
1 files changed, 10 insertions, 16 deletions
diff --git a/apps/playback.c b/apps/playback.c
index caaaddec6e..aa21ccc39b 100644
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -1047,14 +1047,8 @@ static bool voice_pcmbuf_insert_callback(
* against resampling buffer overflows. */
inp_count = dsp_input_count(out_count);
- if (inp_count <= 0)
- {
- DEBUGF("Error: dsp_input_count(%ld=dsp_output_count(%ld))=%ld<=0\n",
- out_count, count, inp_count);
- /* If this happens, there are samples of codec data that don't
- * become a number of pcm samples, and something is broken */
- return false;
- }
+ if (inp_count <= 0)
+ return true;
/* Input size has grown, no error, just don't write more than length */
if (inp_count > count)
@@ -1062,6 +1056,9 @@ static bool voice_pcmbuf_insert_callback(
out_count = dsp_process(dest, src, inp_count);
+ if (out_count <= 0)
+ return true;
+
if (playing)
{
pcmbuf_mix_voice(out_count);
@@ -1329,14 +1326,8 @@ static bool codec_pcmbuf_insert_callback(
* against resampling buffer overflows. */
inp_count = dsp_input_count(out_count);
- if (inp_count <= 0)
- {
- DEBUGF("Error: dsp_input_count(%ld=dsp_output_count(%ld))=%ld<=0\n",
- out_count, count, inp_count);
- /* If this happens, there are samples of codec data that don't
- * become a number of pcm samples, and something is broken */
- return false;
- }
+ if (inp_count <= 0)
+ return true;
/* Input size has grown, no error, just don't write more than length */
if (inp_count > count)
@@ -1344,6 +1335,9 @@ static bool codec_pcmbuf_insert_callback(
out_count = dsp_process(dest, src, inp_count);
+ if (out_count <= 0)
+ return true;
+
pcmbuf_write_complete(out_count);
#ifdef PLAYBACK_VOICE