summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
Diffstat (limited to 'media')
-rw-r--r--media/jni/soundpool/SoundPool.cpp2
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);