Lines Matching defs:track

50 /* VERY_VERY_VERBOSE_LOGGING will show exactly which process hook and track hook is
107 // AudioMixer is not yet capable of more than 32 active track inputs
168 ALOGV("add track (%d)", n);
169 // assume default parameters for the track, except where noted below
254 // Called when channel masks have changed for a track name
259 track_t &track = mState.tracks[name];
261 if (trackChannelMask == track.channelMask
262 && mixerChannelMask == track.mMixerChannelMask) {
268 const bool mixerChannelCountChanged = track.mMixerChannelCount != mixerChannelCount;
273 track.channelMask = trackChannelMask;
274 track.channelCount = trackChannelCount;
275 track.mMixerChannelMask = mixerChannelMask;
276 track.mMixerChannelCount = mixerChannelCount;
278 // channel masks have changed, does this track need a downmixer?
280 const audio_format_t prevDownmixerFormat = track.mDownmixRequiresFormat;
283 "prepareForDownmix error %d, track channel mask %#x, mixer channel mask %#x",
284 status, track.channelMask, track.mMixerChannelMask);
286 if (prevDownmixerFormat != track.mDownmixRequiresFormat) {
287 track.prepareForReformat(); // because of downmixer, track format may change!
290 if (track.resampler && mixerChannelCountChanged) {
292 const uint32_t resetToSampleRate = track.sampleRate;
293 delete track.resampler;
294 track.resampler = NULL;
295 track.sampleRate = mSampleRate; // without resampler, track rate is device sample rate.
297 track.setResampler(resetToSampleRate /*trackSampleRate*/, mSampleRate /*devSampleRate*/);
313 // this track had previously been configured with a downmixer, delete it
330 // MONO_HACK Only remix (upmix or downmix) if the track and mixer/device channel masks
438 LOG_ALWAYS_FATAL_IF(name < 0 || name >= (int)MAX_NUM_TRACKS, "bad track name %d", name);
440 track_t& track(mState.tracks[ name ]);
441 if (track.enabled) {
442 track.enabled = false;
446 delete track.resampler;
447 track.resampler = NULL;
453 delete track.mTimestretchBufferProvider;
454 track.mTimestretchBufferProvider = NULL;
461 ALOG_ASSERT(uint32_t(name) < MAX_NUM_TRACKS, "bad track name %d", name);
462 track_t& track = mState.tracks[name];
464 if (!track.enabled) {
465 track.enabled = true;
474 ALOG_ASSERT(uint32_t(name) < MAX_NUM_TRACKS, "bad track name %d", name);
475 track_t& track = mState.tracks[name];
477 if (track.enabled) {
478 track.enabled = false;
612 ALOG_ASSERT(uint32_t(name) < MAX_NUM_TRACKS, "bad track name %d", name);
613 track_t& track = mState.tracks[name];
625 if (setChannelMasks(name, trackChannelMask, track.mMixerChannelMask)) {
631 if (track.mainBuffer != valueBuf) {
632 track.mainBuffer = valueBuf;
638 if (track.auxBuffer != valueBuf) {
639 track.auxBuffer = valueBuf;
646 if (track.mFormat != format) {
648 track.mFormat = format;
650 track.prepareForReformat();
655 // for a specific track? or per mixer?
660 if (track.mMixerFormat != format) {
661 track.mMixerFormat = format;
668 if (setChannelMasks(name, track.channelMask, mixerChannelMask)) {
674 LOG_ALWAYS_FATAL("setParameter track: bad param %d", param);
682 if (track.setResampler(uint32_t(valueInt), mSampleRate)) {
689 track.resetResampler();
693 delete track.resampler;
694 track.resampler = NULL;
695 track.sampleRate = mSampleRate;
709 &track.auxLevel, &track.prevAuxLevel, &track.auxInc,
710 &track.mAuxLevel, &track.mPrevAuxLevel, &track.mAuxInc)) {
712 target == VOLUME ? "VOLUME" : "RAMP_VOLUME", track.auxLevel);
720 &track.volume[param - VOLUME0], &track.prevVolume[param - VOLUME0],
721 &track.volumeInc[param - VOLUME0],
722 &track.mVolume[param - VOLUME0], &track.mPrevVolume[param - VOLUME0],
723 &track.mVolumeInc[param - VOLUME0])) {
726 track.volume[param - VOLUME0]);
742 if (track.setPlaybackRate(*playbackRate)) {
768 ALOGV("Creating resampler from track %d Hz to device %d Hz",
891 ALOG_ASSERT(uint32_t(name) < MAX_NUM_TRACKS, "bad track name %d", name);
1029 // The check prevents a muted track from acquiring a process hook.
1031 // This is dangerous if the track is MONO as that requires
1050 // track hooks for subsequent mixer process
1422 // acquire each track's buffer
1468 // t.in == NULL can happen if the track was flushed just after having
1511 // release each track's buffer
1571 // t.in == NULL can happen if the track was flushed just after having
1590 // one track, 16 bits stereo without resampling is the most common case
1599 //ALOG_ASSERT((1 << i) == state->enabledTracks, "more than 1 track enabled");
1616 // in == NULL can happen if the track was flushed just after having
1628 " %p track %d, channels %d, needs %08x, volume %08x vfl %f vfr %f",
1650 // we process only one track.
1814 /* This process hook is called when there is a single track without
1829 ALOG_ASSERT((1 << i) == state->enabledTracks, "more than 1 track enabled");
1843 // in == NULL can happen if the track was flushed just after having
1849 "buffer %p track %p, channels %d, needs %#x",
1872 /* This track hook is called to do resampling then mixing,
1873 * pulling from the track's upstream AudioBufferProvider.
1903 /* This track hook is called to mix a track, when no resampling is required.
1968 /* Returns the proper track hook to use for mixing the track into the output buffer.
2039 * PROCESSTYPE_NORESAMPLEONETRACK, a mix involving one track, no resampling.
2042 * a stereo output track, the input track cannot be MONO. This should be