Lines Matching refs:sample

230         sp<Sample> sample = new Sample(sampleID, fd, offset, length);
231 mSamples.add(sampleID, sample);
232 sample->startLoad();
238 // It theoretically possible that sample loads might decode out-of-order.
263 // is sample ready?
264 sp<Sample> sample(findSample_l(sampleID));
265 if ((sample == 0) || (sample->state() != Sample::READY)) {
266 ALOGW(" sample %d not READY", sampleID);
284 channel->play(sample, channelID, leftVolume, rightVolume, priority, loop, rate);
681 ALOGE("Unable to load sample");
719 void SoundChannel::play(const sp<Sample>& sample, int nextChannelID, float leftVolume,
731 this, sample->sampleID(), nextChannelID, leftVolume, rightVolume,
737 mNextEvent.set(sample, nextChannelID, leftVolume, rightVolume, priority, loop, rate);
752 int numChannels = sample->numChannels();
753 uint32_t sampleRate = uint32_t(float(sample->sampleRate()) * rate + 0.5);
757 const audio_format_t format = sample->format();
760 frameCount = sample->size() / frameSize;
765 // Ensure minimum audio buffer size in case of short looped sample
771 // check if the existing track has the same sample id.
772 if (mAudioTrack != 0 && mPrevSampleID == sample->sampleID()) {
773 // the sample rate may fail to change if the audio track is a fast track.
776 ALOGV("reusing track %p for sample %d", mAudioTrack.get(), sample->sampleID());
789 // do not create a new audio track if current track is compatible with sample parameters
791 newTrack = new AudioTrack(streamType, sampleRate, sample->format(),
792 channelMask, sample->getIMemory(), AUDIO_OUTPUT_FLAG_FAST, callback, userData,
798 newTrack = new AudioTrack(streamType, sampleRate, sample->format(),
813 ALOGV("using new track %p for sample %d", newTrack.get(), sample->sampleID());
818 mSample = sample;
841 sp<Sample> sample;
858 sample = mNextEvent.sample();
867 play(sample, nextChannelID, leftVolume, rightVolume, priority, loop, rate);
896 sp<Sample> sample = mSample;
910 if (sample != 0) {
915 if (mPos < (int)sample->size()) {
916 uint8_t* p = sample->data() + mPos;
917 count = sample->size() - mPos;
1102 void SoundEvent::set(const sp<Sample>& sample, int channelID, float leftVolume,
1105 mSample = sample;