Lines Matching refs:sampleID
188 sp<Sample> SoundPool::findSample(int sampleID) in findSample() argument
191 return findSample_l(sampleID); in findSample()
194 sp<Sample> SoundPool::findSample_l(int sampleID) in findSample_l() argument
196 return mSamples.valueFor(sampleID); in findSample_l()
223 int sampleID; in load() local
226 sampleID = ++mNextSampleID; in load()
227 sp<Sample> sample = new Sample(sampleID, fd, offset, length); in load()
228 mSamples.add(sampleID, sample); in load()
236 mDecodeThread->loadSample(sampleID); in load()
237 return sampleID; in load()
240 bool SoundPool::unload(int sampleID) in unload() argument
242 ALOGV("unload: sampleID=%d", sampleID); in unload()
244 return mSamples.removeItem(sampleID) >= 0; // removeItem() returns index or BAD_VALUE in unload()
247 int SoundPool::play(int sampleID, float leftVolume, float rightVolume, in play() argument
251 sampleID, leftVolume, rightVolume, priority, loop, rate); in play()
261 sp<Sample> sample(findSample_l(sampleID)); in play()
263 ALOGW(" sample %d not READY", sampleID); in play()
270 channel = allocateChannel_l(priority, sampleID); in play()
285 SoundChannel* SoundPool::allocateChannel_l(int priority, int sampleID) in allocateChannel_l() argument
293 if (sampleID == (*iter)->getPrevSampleID() && (*iter)->state() == SoundChannel::IDLE) { in allocateChannel_l()
483 Sample::Sample(int sampleID, int fd, int64_t offset, int64_t length) in Sample() argument
486 mSampleID = sampleID; in Sample()
735 this, sample->sampleID(), nextChannelID, leftVolume, rightVolume, in play()
777 if (mAudioTrack != 0 && mPrevSampleID == sample->sampleID()) { in play()
781 ALOGV("reusing track %p for sample %d", mAudioTrack.get(), sample->sampleID()); in play()
822 ALOGV("using new track %p for sample %d", newTrack.get(), sample->sampleID()); in play()
978 mPrevSampleID = mSample->sampleID(); in doStop_l()