From 1da856cca9bdf289aa91a3eadef613a7a1609548 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sun, 27 Jul 2014 21:47:25 -0600 Subject: [PATCH] PCM: Forget to increment pointers in one part of sub-sampling --- audio/pcm_decode.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/audio/pcm_decode.c b/audio/pcm_decode.c index 0c0191dee1..b3ca6c525c 100644 --- a/audio/pcm_decode.c +++ b/audio/pcm_decode.c @@ -569,6 +569,16 @@ static void pcm_subsample(FAR struct pcm_decode_s *priv, *dest++ = *src++; } } + else + { + /* If the data is already position at the beginning of the audio + * buffer, then just increment the buffer pointers around the + * data. + */ + + src += copysize; + dest += copysize; + } /* Update the number of bytes in the working buffer and reset the * skip value