summaryrefslogtreecommitdiff
path: root/nuttx/audio
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-07-27 21:47:25 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-07-27 21:47:25 -0600
commit6c3d6661150a3193cc6cf76836b35711ace1ca6f (patch)
treee41bcc04dde413f6fe826a6a5f4b367eb421b55b /nuttx/audio
parent21b185668d583493e3a95f105a2e1cb5cdc2d5aa (diff)
downloadnuttx-6c3d6661150a3193cc6cf76836b35711ace1ca6f.tar.gz
nuttx-6c3d6661150a3193cc6cf76836b35711ace1ca6f.tar.bz2
nuttx-6c3d6661150a3193cc6cf76836b35711ace1ca6f.zip
PCM: Forget to increment pointers in one part of sub-sampling
Diffstat (limited to 'nuttx/audio')
-rw-r--r--nuttx/audio/pcm_decode.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/nuttx/audio/pcm_decode.c b/nuttx/audio/pcm_decode.c
index 0c0191dee..b3ca6c525 100644
--- a/nuttx/audio/pcm_decode.c
+++ b/nuttx/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