diff options
author | Andy Hung <hunga@google.com> | 2015-03-17 23:05:12 +0000 |
---|---|---|
committer | Andy Hung <hunga@google.com> | 2015-03-17 23:05:12 +0000 |
commit | bc4537393b02b39433e07fed4ed57186d8e5959f (patch) | |
tree | c9b3f05a238831065220463db9ba2a052e329f9b /media/jni/soundpool/SoundPool.cpp | |
parent | b801f73343194cd081f675a5dc2b3e90959cf6d1 (diff) | |
download | frameworks_base-bc4537393b02b39433e07fed4ed57186d8e5959f.zip frameworks_base-bc4537393b02b39433e07fed4ed57186d8e5959f.tar.gz frameworks_base-bc4537393b02b39433e07fed4ed57186d8e5959f.tar.bz2 |
Revert "Revert "soundpool: update sample rate when reusing audiotrack""
This reverts commit b801f73343194cd081f675a5dc2b3e90959cf6d1.
Change-Id: I0f6ee7fc981d65040f32e7852a5f66fd391b329d
Diffstat (limited to 'media/jni/soundpool/SoundPool.cpp')
-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); |