diff options
author | Glenn Kasten <gkasten@google.com> | 2015-03-04 23:25:25 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-03-04 23:25:28 +0000 |
commit | fad60c343af5662d109f8aa5bf600694242c7609 (patch) | |
tree | 78e49a92a8e9e79f3566a71c4716bb5f73d70ec6 /media | |
parent | 9e9e2f70145401e5919db59fb5127e7cc903db25 (diff) | |
parent | a7d57a6f0068b1e2a0f07ca427cfba198b12a9b9 (diff) | |
download | frameworks_base-fad60c343af5662d109f8aa5bf600694242c7609.zip frameworks_base-fad60c343af5662d109f8aa5bf600694242c7609.tar.gz frameworks_base-fad60c343af5662d109f8aa5bf600694242c7609.tar.bz2 |
Merge "soundpool: update sample rate when reusing audiotrack"
Diffstat (limited to 'media')
-rw-r--r-- | media/jni/soundpool/SoundPool.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/media/jni/soundpool/SoundPool.cpp b/media/jni/soundpool/SoundPool.cpp index 8957b3c..dfe2844 100644 --- a/media/jni/soundpool/SoundPool.cpp +++ b/media/jni/soundpool/SoundPool.cpp @@ -743,8 +743,10 @@ void SoundChannel::play(const sp<Sample>& sample, int nextChannelID, float leftV // From now on, AudioTrack callbacks received with previous toggle value will be ignored. mToggle = toggle; mAudioTrack = newTrack; + ALOGV("using new track %p for sample %d", newTrack.get(), sample->sampleID()); } else { newTrack = mAudioTrack; + newTrack->setSampleRate(sampleRate); ALOGV("reusing track %p for sample %d", mAudioTrack.get(), sample->sampleID()); } newTrack->setVolume(leftVolume, rightVolume); |