Lines Matching refs:track

51 /* VERY_VERY_VERBOSE_LOGGING will show exactly which process hook and track hook is
108 // AudioMixer is not yet capable of more than 32 active track inputs
169 ALOGV("add track (%d)", n);
170 // assume default parameters for the track, except where noted below
255 // Called when channel masks have changed for a track name
260 track_t &track = mState.tracks[name];
262 if (trackChannelMask == track.channelMask
263 && mixerChannelMask == track.mMixerChannelMask) {
269 const bool mixerChannelCountChanged = track.mMixerChannelCount != mixerChannelCount;
274 track.channelMask = trackChannelMask;
275 track.channelCount = trackChannelCount;
276 track.mMixerChannelMask = mixerChannelMask;
277 track.mMixerChannelCount = mixerChannelCount;
279 // channel masks have changed, does this track need a downmixer?
281 const audio_format_t prevDownmixerFormat = track.mDownmixRequiresFormat;
284 "prepareForDownmix error %d, track channel mask %#x, mixer channel mask %#x",
285 status, track.channelMask, track.mMixerChannelMask);
287 if (prevDownmixerFormat != track.mDownmixRequiresFormat) {
288 track.prepareForReformat(); // because of downmixer, track format may change!
291 if (track.resampler && mixerChannelCountChanged) {
293 const uint32_t resetToSampleRate = track.sampleRate;
294 delete track.resampler;
295 track.resampler = NULL;
296 track.sampleRate = mSampleRate; // without resampler, track rate is device sample rate.
298 track.setResampler(resetToSampleRate /*trackSampleRate*/, mSampleRate /*devSampleRate*/);
308 // this track had previously been configured with a downmixer, delete it
325 // MONO_HACK Only remix (upmix or downmix) if the track and mixer/device channel masks
433 LOG_ALWAYS_FATAL_IF(name < 0 || name >= (int)MAX_NUM_TRACKS, "bad track name %d", name);
435 track_t& track(mState.tracks[ name ]);
436 if (track.enabled) {
437 track.enabled = false;
441 delete track.resampler;
442 track.resampler = NULL;
448 delete track.mTimestretchBufferProvider;
449 track.mTimestretchBufferProvider = NULL;
456 ALOG_ASSERT(uint32_t(name) < MAX_NUM_TRACKS, "bad track name %d", name);
457 track_t& track = mState.tracks[name];
459 if (!track.enabled) {
460 track.enabled = true;
469 ALOG_ASSERT(uint32_t(name) < MAX_NUM_TRACKS, "bad track name %d", name);
470 track_t& track = mState.tracks[name];
472 if (track.enabled) {
473 track.enabled = false;
607 ALOG_ASSERT(uint32_t(name) < MAX_NUM_TRACKS, "bad track name %d", name);
608 track_t& track = mState.tracks[name];
620 if (setChannelMasks(name, trackChannelMask, track.mMixerChannelMask)) {
626 if (track.mainBuffer != valueBuf) {
627 track.mainBuffer = valueBuf;
633 if (track.auxBuffer != valueBuf) {
634 track.auxBuffer = valueBuf;
641 if (track.mFormat != format) {
643 track.mFormat = format;
645 track.prepareForReformat();
650 // for a specific track? or per mixer?
655 if (track.mMixerFormat != format) {
656 track.mMixerFormat = format;
663 if (setChannelMasks(name, track.channelMask, mixerChannelMask)) {
669 LOG_ALWAYS_FATAL("setParameter track: bad param %d", param);
677 if (track.setResampler(uint32_t(valueInt), mSampleRate)) {
684 track.resetResampler();
688 delete track.resampler;
689 track.resampler = NULL;
690 track.sampleRate = mSampleRate;
704 &track.auxLevel, &track.prevAuxLevel, &track.auxInc,
705 &track.mAuxLevel, &track.mPrevAuxLevel, &track.mAuxInc)) {
707 target == VOLUME ? "VOLUME" : "RAMP_VOLUME", track.auxLevel);
715 &track.volume[param - VOLUME0], &track.prevVolume[param - VOLUME0],
716 &track.volumeInc[param - VOLUME0],
717 &track.mVolume[param - VOLUME0], &track.mPrevVolume[param - VOLUME0],
718 &track.mVolumeInc[param - VOLUME0])) {
721 track.volume[param - VOLUME0]);
737 if (track.setPlaybackRate(*playbackRate)) {
763 ALOGV("Creating resampler from track %d Hz to device %d Hz",
886 ALOG_ASSERT(uint32_t(name) < MAX_NUM_TRACKS, "bad track name %d", name);
1024 // The check prevents a muted track from acquiring a process hook.
1026 // This is dangerous if the track is MONO as that requires
1045 // track hooks for subsequent mixer process
1417 // acquire each track's buffer
1463 // t.in == NULL can happen if the track was flushed just after having
1506 // release each track's buffer
1566 // t.in == NULL can happen if the track was flushed just after having
1585 // one track, 16 bits stereo without resampling is the most common case
1594 //ALOG_ASSERT((1 << i) == state->enabledTracks, "more than 1 track enabled");
1611 // in == NULL can happen if the track was flushed just after having
1618 " %p track %d, channels %d, needs %08x, volume %08x vfl %f vfr %f",
1640 // we process only one track.
1804 /* This process hook is called when there is a single track without
1819 ALOG_ASSERT((1 << i) == state->enabledTracks, "more than 1 track enabled");
1833 // in == NULL can happen if the track was flushed just after having
1839 "buffer %p track %p, channels %d, needs %#x",
1862 /* This track hook is called to do resampling then mixing,
1863 * pulling from the track's upstream AudioBufferProvider.
1893 /* This track hook is called to mix a track, when no resampling is required.
1958 /* Returns the proper track hook to use for mixing the track into the output buffer.
2029 * PROCESSTYPE_NORESAMPLEONETRACK, a mix involving one track, no resampling.
2032 * a stereo output track, the input track cannot be MONO. This should be