Lines Matching refs:t
96 auto t = preCreateTrack(); in create() local
100 t->needs = 0; in create()
105 t->volume[0] = 0; in create()
106 t->volume[1] = 0; in create()
107 t->prevVolume[0] = 0 << 16; in create()
108 t->prevVolume[1] = 0 << 16; in create()
109 t->volumeInc[0] = 0; in create()
110 t->volumeInc[1] = 0; in create()
111 t->auxLevel = 0; in create()
112 t->auxInc = 0; in create()
113 t->prevAuxLevel = 0; in create()
116 t->mVolume[0] = 0.f; in create()
117 t->mVolume[1] = 0.f; in create()
118 t->mPrevVolume[0] = 0.f; in create()
119 t->mPrevVolume[1] = 0.f; in create()
120 t->mVolumeInc[0] = 0.; in create()
121 t->mVolumeInc[1] = 0.; in create()
122 t->mAuxLevel = 0.; in create()
123 t->mAuxInc = 0.; in create()
124 t->mPrevAuxLevel = 0.; in create()
128 t->channelCount = audio_channel_count_from_out_mask(channelMask); in create()
129 t->enabled = false; in create()
132 t->channelMask = channelMask; in create()
133 t->sessionId = sessionId; in create()
135 t->bufferProvider = NULL; in create()
136 t->buffer.raw = NULL; in create()
139 t->hook = NULL; in create()
140 t->mIn = NULL; in create()
141 t->sampleRate = mSampleRate; in create()
143 t->mainBuffer = NULL; in create()
144 t->auxBuffer = NULL; in create()
145 t->mMixerFormat = AUDIO_FORMAT_PCM_16_BIT; in create()
146 t->mFormat = format; in create()
147 t->mMixerInFormat = kUseFloat && kUseNewMixer ? in create()
149 t->mMixerChannelMask = audio_channel_mask_from_representation_and_bits( in create()
151 t->mMixerChannelCount = audio_channel_count_from_out_mask(t->mMixerChannelMask); in create()
152 status_t status = postCreateTrack(t.get()); in create()
154 mTracks[name] = t; in create()
614 const std::shared_ptr<TrackBase> &t = pair.second; in process__validate() local
615 if (!t->enabled) continue; in process__validate()
618 mGroups[t->mainBuffer].emplace_back(name); // mGroups also in order of name. in process__validate()
622 n |= NEEDS_CHANNEL_1 + t->channelCount - 1; in process__validate()
623 if (t->doesResample()) { in process__validate()
626 if (t->auxLevel != 0 && t->auxBuffer != NULL) { in process__validate()
630 if (t->volumeInc[0]|t->volumeInc[1]) { in process__validate()
632 } else if (!t->doesResample() && t->volumeRL == 0) { in process__validate()
635 t->needs = n; in process__validate()
638 t->hook = &TrackBase::track__nop; in process__validate()
646 t->hook = TrackBase::getTrackHook(TRACKTYPE_RESAMPLE, t->mMixerChannelCount, in process__validate()
647 t->mMixerInFormat, t->mMixerFormat); in process__validate()
652 t->hook = TrackBase::getTrackHook( in process__validate()
653 (t->mMixerChannelMask == AUDIO_CHANNEL_OUT_STEREO // TODO: MONO_HACK in process__validate()
654 && t->channelMask == AUDIO_CHANNEL_OUT_MONO) in process__validate()
656 t->mMixerChannelCount, in process__validate()
657 t->mMixerInFormat, t->mMixerFormat); in process__validate()
661 t->hook = TrackBase::getTrackHook(TRACKTYPE_NORESAMPLE, t->mMixerChannelCount, in process__validate()
662 t->mMixerInFormat, t->mMixerFormat); in process__validate()
686 const std::shared_ptr<TrackBase> &t = mTracks[mEnabled[0]]; in process__validate() local
687 if ((t->needs & NEEDS_MUTE) == 0) { in process__validate()
694 t->mMixerChannelCount, t->mMixerInFormat, t->mMixerFormat); in process__validate()
713 const std::shared_ptr<TrackBase> &t = mTracks[name]; in process__validate() local
714 if (!t->doesResample() && t->volumeRL == 0) { in process__validate()
715 t->needs |= NEEDS_MUTE; in process__validate()
716 t->hook = &TrackBase::track__nop; in process__validate()
726 const std::shared_ptr<TrackBase> &t = mTracks[mEnabled[0]]; in process__validate() local
729 t->mMixerChannelCount, t->mMixerInFormat, t->mMixerFormat); in process__validate()
1036 const std::shared_ptr<TrackBase> &t = mTracks[group[0]]; in process__nop() local
1037 memset(t->mainBuffer, 0, in process__nop()
1038 mFrameCount * audio_bytes_per_frame(t->getMixerChannelCount(), t->mMixerFormat)); in process__nop()
1042 const std::shared_ptr<TrackBase> &t = mTracks[name]; in process__nop() local
1045 t->buffer.frameCount = outFrames; in process__nop()
1046 t->bufferProvider->getNextBuffer(&t->buffer); in process__nop()
1047 if (t->buffer.raw == NULL) break; in process__nop()
1048 outFrames -= t->buffer.frameCount; in process__nop()
1049 t->bufferProvider->releaseBuffer(&t->buffer); in process__nop()
1068 const std::shared_ptr<TrackBase> &t = mTracks[name]; in process__genericNoResampling() local
1069 t->buffer.frameCount = mFrameCount; in process__genericNoResampling()
1070 t->bufferProvider->getNextBuffer(&t->buffer); in process__genericNoResampling()
1071 t->frameCount = t->buffer.frameCount; in process__genericNoResampling()
1072 t->mIn = t->buffer.raw; in process__genericNoResampling()
1081 const std::shared_ptr<TrackBase> &t = mTracks[name]; in process__genericNoResampling() local
1083 if (CC_UNLIKELY(t->needs & NEEDS_AUX)) { in process__genericNoResampling()
1084 aux = t->auxBuffer + numFrames; in process__genericNoResampling()
1089 if (t->mIn == nullptr) { in process__genericNoResampling()
1092 size_t inFrames = (t->frameCount > outFrames)?outFrames:t->frameCount; in process__genericNoResampling()
1094 (t.get()->*t->hook)( in process__genericNoResampling()
1095 outTemp + (frameCount - outFrames) * t->mMixerChannelCount, in process__genericNoResampling()
1097 t->frameCount -= inFrames; in process__genericNoResampling()
1103 if (t->frameCount == 0 && outFrames) { in process__genericNoResampling()
1104 t->bufferProvider->releaseBuffer(&t->buffer); in process__genericNoResampling()
1105 t->buffer.frameCount = (mFrameCount - numFrames) - in process__genericNoResampling()
1107 t->bufferProvider->getNextBuffer(&t->buffer); in process__genericNoResampling()
1108 t->mIn = t->buffer.raw; in process__genericNoResampling()
1109 if (t->mIn == nullptr) { in process__genericNoResampling()
1112 t->frameCount = t->buffer.frameCount; in process__genericNoResampling()
1129 const std::shared_ptr<TrackBase> &t = mTracks[name]; in process__genericNoResampling() local
1130 t->bufferProvider->releaseBuffer(&t->buffer); in process__genericNoResampling()
1149 const std::shared_ptr<TrackBase> &t = mTracks[name]; in process__genericResampling() local
1151 if (CC_UNLIKELY(t->needs & NEEDS_AUX)) { in process__genericResampling()
1152 aux = t->auxBuffer; in process__genericResampling()
1158 if (t->needs & NEEDS_RESAMPLE) { in process__genericResampling()
1159 (t.get()->*t->hook)(outTemp, numFrames, mResampleTemp.get() /* naked ptr */, aux); in process__genericResampling()
1165 t->buffer.frameCount = numFrames - outFrames; in process__genericResampling()
1166 t->bufferProvider->getNextBuffer(&t->buffer); in process__genericResampling()
1167 t->mIn = t->buffer.raw; in process__genericResampling()
1170 if (t->mIn == nullptr) break; in process__genericResampling()
1172 (t.get()->*t->hook)( in process__genericResampling()
1173 outTemp + outFrames * t->mMixerChannelCount, t->buffer.frameCount, in process__genericResampling()
1176 outFrames += t->buffer.frameCount; in process__genericResampling()
1178 t->bufferProvider->releaseBuffer(&t->buffer); in process__genericResampling()
1194 const std::shared_ptr<TrackBase> &t = mTracks[name]; in process__oneTrack16BitsStereoNoResampling() local
1196 AudioBufferProvider::Buffer& b(t->buffer); in process__oneTrack16BitsStereoNoResampling()
1198 int32_t* out = t->mainBuffer; in process__oneTrack16BitsStereoNoResampling()
1202 const int16_t vl = t->volume[0]; in process__oneTrack16BitsStereoNoResampling()
1203 const int16_t vr = t->volume[1]; in process__oneTrack16BitsStereoNoResampling()
1204 const uint32_t vrl = t->volumeRL; in process__oneTrack16BitsStereoNoResampling()
1207 t->bufferProvider->getNextBuffer(&b); in process__oneTrack16BitsStereoNoResampling()
1213 if ( AUDIO_FORMAT_PCM_FLOAT == t->mMixerFormat ) { in process__oneTrack16BitsStereoNoResampling()
1215 * t->mMixerChannelCount * audio_bytes_per_sample(t->mMixerFormat)); in process__oneTrack16BitsStereoNoResampling()
1218 * t->mMixerChannelCount * audio_bytes_per_sample(t->mMixerFormat)); in process__oneTrack16BitsStereoNoResampling()
1223 in, name, t->channelCount, t->needs, vrl, t->mVolume[0], t->mVolume[1]); in process__oneTrack16BitsStereoNoResampling()
1228 switch (t->mMixerFormat) { in process__oneTrack16BitsStereoNoResampling()
1266 LOG_ALWAYS_FATAL("bad mixer format: %d", t->mMixerFormat); in process__oneTrack16BitsStereoNoResampling()
1269 t->bufferProvider->releaseBuffer(&b); in process__oneTrack16BitsStereoNoResampling()
1428 const std::shared_ptr<TrackBase> &t = mTracks[mEnabled[0]]; in process__noResampleOneTrack() local
1429 const uint32_t channels = t->mMixerChannelCount; in process__noResampleOneTrack()
1430 TO* out = reinterpret_cast<TO*>(t->mainBuffer); in process__noResampleOneTrack()
1431 TA* aux = reinterpret_cast<TA*>(t->auxBuffer); in process__noResampleOneTrack()
1432 const bool ramp = t->needsRamp(); in process__noResampleOneTrack()
1435 AudioBufferProvider::Buffer& b(t->buffer); in process__noResampleOneTrack()
1438 t->bufferProvider->getNextBuffer(&b); in process__noResampleOneTrack()
1445 * channels * audio_bytes_per_sample(t->mMixerFormat)); in process__noResampleOneTrack()
1448 in, &t, t->channelCount, t->needs); in process__noResampleOneTrack()
1453 t->volumeMix<MIXTYPE, is_same<TI, float>::value /* USEFLOATVOL */, false /* ADJUSTVOL */> ( in process__noResampleOneTrack()
1463 t->bufferProvider->releaseBuffer(&b); in process__noResampleOneTrack()
1466 t->adjustVolumeRamp(aux != NULL, is_same<TI, float>::value); in process__noResampleOneTrack()