summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMing Zhou <b42586@freescale.com>2013-02-27 17:12:37 +0800
committerguoyin.chen <guoyin.chen@freescale.com>2013-06-07 14:04:44 +0800
commitda5b509fd8323bacf4043e2c29c6ee1d0716be60 (patch)
tree0e511523bff6f3449fba1df6d39ec40e08e7ac2d
parenteffc08ed1eb1d55ca13997ec96f72e40a0866394 (diff)
Noise will be heard if audio sample rate not matched with audio track
When audio sample rate which set to audio track is not the same with the actual pcm data, noise will be heard. Fix the bug when write 8 bit pcm samples. Change-Id: Idcb0d7b0e9aaa250dd22b758c8337e23d1706049 Signed-off-by: Ming Zhou <b42586@freescale.com> Signed-off-by: guoyin.chen <guoyin.chen@freescale.com>
-rw-r--r--media/libmedia/AudioTrack.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/media/libmedia/AudioTrack.cpp b/media/libmedia/AudioTrack.cpp
index aec8c4a6..3278dbe0 100644
--- a/media/libmedia/AudioTrack.cpp
+++ b/media/libmedia/AudioTrack.cpp
@@ -1121,8 +1121,8 @@ ssize_t AudioTrack::write(const void* buffer, size_t userSize)
} else {
toWrite = audioBuffer.size;
memcpy(audioBuffer.i8, src, toWrite);
- src += toWrite;
}
+ src += toWrite;
userSize -= toWrite;
written += toWrite;