diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2009-02-13 12:57:50 -0800 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-02-13 12:57:50 -0800 |
commit | da996f390e17e16f2dfa60e972e7ebc4f868f37e (patch) | |
tree | 00a0f15270d4c7b619fd34d8383257e1761082f4 /media/jni/soundpool | |
parent | d24b8183b93e781080b2c16c487e60d51c12da31 (diff) | |
download | frameworks_base-da996f390e17e16f2dfa60e972e7ebc4f868f37e.zip frameworks_base-da996f390e17e16f2dfa60e972e7ebc4f868f37e.tar.gz frameworks_base-da996f390e17e16f2dfa60e972e7ebc4f868f37e.tar.bz2 |
auto import from //branches/cupcake/...@131421
Diffstat (limited to 'media/jni/soundpool')
-rw-r--r-- | media/jni/soundpool/SoundPool.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/media/jni/soundpool/SoundPool.cpp b/media/jni/soundpool/SoundPool.cpp index 559f9d5..02731825 100644 --- a/media/jni/soundpool/SoundPool.cpp +++ b/media/jni/soundpool/SoundPool.cpp @@ -491,10 +491,11 @@ void SoundChannel::play(const sp<Sample>& sample, int nextChannelID, float leftV // initialize track int afFrameCount; int afSampleRate; - if (AudioSystem::getOutputFrameCount(&afFrameCount) != NO_ERROR) { + int streamType = mSoundPool->streamType(); + if (AudioSystem::getOutputFrameCount(&afFrameCount, streamType) != NO_ERROR) { afFrameCount = kDefaultFrameCount; } - if (AudioSystem::getOutputSamplingRate(&afSampleRate) != NO_ERROR) { + if (AudioSystem::getOutputSamplingRate(&afSampleRate, streamType) != NO_ERROR) { afSampleRate = kDefaultSampleRate; } int numChannels = sample->numChannels(); @@ -522,10 +523,10 @@ void SoundChannel::play(const sp<Sample>& sample, int nextChannelID, float leftV void *userData = (void *)((unsigned long)this | toggle); #ifdef USE_SHARED_MEM_BUFFER - newTrack = new AudioTrack(mSoundPool->streamType(), sampleRate, sample->format(), + newTrack = new AudioTrack(streamType, sampleRate, sample->format(), numChannels, sample->getIMemory(), 0, callback, userData); #else - newTrack = new AudioTrack(mSoundPool->streamType(), sampleRate, sample->format(), + newTrack = new AudioTrack(streamType, sampleRate, sample->format(), numChannels, frameCount, 0, callback, userData, bufferFrames); #endif if (newTrack->initCheck() != NO_ERROR) { |