diff options
author | Ming Zhou <b42586@freescale.com> | 2013-02-27 17:12:37 +0800 |
---|---|---|
committer | DvTonder <david.vantonder@gmail.com> | 2013-06-10 21:40:20 -0400 |
commit | c6cade74b74af9fc66cd7c6af8bf74e4fe1361bc (patch) | |
tree | de77f550c66dc2b5c76546d36d8d26e054f38029 /media | |
parent | 0dcf5b32a1bfe723568ee16d1155db668a2e0f4c (diff) | |
download | frameworks_av-c6cade74b74af9fc66cd7c6af8bf74e4fe1361bc.zip frameworks_av-c6cade74b74af9fc66cd7c6af8bf74e4fe1361bc.tar.gz frameworks_av-c6cade74b74af9fc66cd7c6af8bf74e4fe1361bc.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.
AOSP commit: https://android-review.googlesource.com/#/c/59837/
Change-Id: Idcb0d7b0e9aaa250dd22b758c8337e23d1706049
Signed-off-by: Ming Zhou <b42586@freescale.com>
Signed-off-by: guoyin.chen <guoyin.chen@freescale.com>
Diffstat (limited to 'media')
-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 0d7d733..a2f4348 100644 --- a/media/libmedia/AudioTrack.cpp +++ b/media/libmedia/AudioTrack.cpp @@ -1283,8 +1283,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; |