diff options
author | Ming Zhou <b42586@freescale.com> | 2013-02-27 17:12:37 +0800 |
---|---|---|
committer | guoyin.chen <guoyin.chen@freescale.com> | 2013-06-07 14:04:44 +0800 |
commit | da5b509fd8323bacf4043e2c29c6ee1d0716be60 (patch) | |
tree | 0e511523bff6f3449fba1df6d39ec40e08e7ac2d /media/libmedia | |
parent | effc08ed1eb1d55ca13997ec96f72e40a0866394 (diff) | |
download | frameworks_av-da5b509fd8323bacf4043e2c29c6ee1d0716be60.zip frameworks_av-da5b509fd8323bacf4043e2c29c6ee1d0716be60.tar.gz frameworks_av-da5b509fd8323bacf4043e2c29c6ee1d0716be60.tar.bz2 |
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>
Diffstat (limited to 'media/libmedia')
-rw-r--r-- | media/libmedia/AudioTrack.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/media/libmedia/AudioTrack.cpp b/media/libmedia/AudioTrack.cpp index aec8c4a..3278dbe 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; |