Lines Matching refs:t
107 auto t = std::make_shared<Track>(); in create() local
111 t->needs = 0; in create()
116 t->volume[0] = 0; in create()
117 t->volume[1] = 0; in create()
118 t->prevVolume[0] = 0 << 16; in create()
119 t->prevVolume[1] = 0 << 16; in create()
120 t->volumeInc[0] = 0; in create()
121 t->volumeInc[1] = 0; in create()
122 t->auxLevel = 0; in create()
123 t->auxInc = 0; in create()
124 t->prevAuxLevel = 0; in create()
127 t->mVolume[0] = 0.f; in create()
128 t->mVolume[1] = 0.f; in create()
129 t->mPrevVolume[0] = 0.f; in create()
130 t->mPrevVolume[1] = 0.f; in create()
131 t->mVolumeInc[0] = 0.; in create()
132 t->mVolumeInc[1] = 0.; in create()
133 t->mAuxLevel = 0.; in create()
134 t->mAuxInc = 0.; in create()
135 t->mPrevAuxLevel = 0.; in create()
139 t->mHapticChannelMask = channelMask & AUDIO_CHANNEL_HAPTIC_ALL; in create()
140 t->mHapticChannelCount = audio_channel_count_from_out_mask(t->mHapticChannelMask); in create()
142 t->channelCount = audio_channel_count_from_out_mask(channelMask); in create()
143 t->enabled = false; in create()
146 t->channelMask = channelMask; in create()
147 t->sessionId = sessionId; in create()
149 t->bufferProvider = NULL; in create()
150 t->buffer.raw = NULL; in create()
153 t->hook = NULL; in create()
154 t->mIn = NULL; in create()
155 t->sampleRate = mSampleRate; in create()
157 t->mainBuffer = NULL; in create()
158 t->auxBuffer = NULL; in create()
159 t->mInputBufferProvider = NULL; in create()
160 t->mMixerFormat = AUDIO_FORMAT_PCM_16_BIT; in create()
161 t->mFormat = format; in create()
162 t->mMixerInFormat = selectMixerInFormat(format); in create()
163 t->mDownmixRequiresFormat = AUDIO_FORMAT_INVALID; // no format required in create()
164 t->mMixerChannelMask = audio_channel_mask_from_representation_and_bits( in create()
166 t->mMixerChannelCount = audio_channel_count_from_out_mask(t->mMixerChannelMask); in create()
167 t->mPlaybackRate = AUDIO_PLAYBACK_RATE_DEFAULT; in create()
169 t->mHapticPlaybackEnabled = false; in create()
170 t->mHapticIntensity = HAPTIC_SCALE_NONE; in create()
171 t->mMixerHapticChannelMask = AUDIO_CHANNEL_NONE; in create()
172 t->mMixerHapticChannelCount = 0; in create()
173 t->mAdjustInChannelCount = t->channelCount + t->mHapticChannelCount; in create()
174 t->mAdjustOutChannelCount = t->channelCount + t->mMixerHapticChannelCount; in create()
175 t->mAdjustNonDestructiveInChannelCount = t->mAdjustOutChannelCount; in create()
176 t->mAdjustNonDestructiveOutChannelCount = t->channelCount; in create()
177 t->mKeepContractedChannels = false; in create()
179 status_t status = t->prepareForDownmix(); in create()
185 ALOGVV("mMixerFormat:%#x mMixerInFormat:%#x\n", t->mMixerFormat, t->mMixerInFormat); in create()
186 t->prepareForReformat(); in create()
187 t->prepareForAdjustChannelsNonDestructive(mFrameCount); in create()
188 t->prepareForAdjustChannels(); in create()
190 mTracks[name] = t; in create()
992 const std::shared_ptr<Track> &t = pair.second; in process__validate() local
993 if (!t->enabled) continue; in process__validate()
996 mGroups[t->mainBuffer].emplace_back(name); // mGroups also in order of name. in process__validate()
1000 n |= NEEDS_CHANNEL_1 + t->channelCount - 1; in process__validate()
1001 if (t->doesResample()) { in process__validate()
1004 if (t->auxLevel != 0 && t->auxBuffer != NULL) { in process__validate()
1008 if (t->volumeInc[0]|t->volumeInc[1]) { in process__validate()
1010 } else if (!t->doesResample() && t->volumeRL == 0) { in process__validate()
1013 t->needs = n; in process__validate()
1016 t->hook = &Track::track__nop; in process__validate()
1024 t->hook = Track::getTrackHook(TRACKTYPE_RESAMPLE, t->mMixerChannelCount, in process__validate()
1025 t->mMixerInFormat, t->mMixerFormat); in process__validate()
1030 t->hook = Track::getTrackHook( in process__validate()
1031 (t->mMixerChannelMask == AUDIO_CHANNEL_OUT_STEREO // TODO: MONO_HACK in process__validate()
1032 && t->channelMask == AUDIO_CHANNEL_OUT_MONO) in process__validate()
1034 t->mMixerChannelCount, in process__validate()
1035 t->mMixerInFormat, t->mMixerFormat); in process__validate()
1039 t->hook = Track::getTrackHook(TRACKTYPE_NORESAMPLE, t->mMixerChannelCount, in process__validate()
1040 t->mMixerInFormat, t->mMixerFormat); in process__validate()
1064 const std::shared_ptr<Track> &t = mTracks[mEnabled[0]]; in process__validate() local
1065 if ((t->needs & NEEDS_MUTE) == 0) { in process__validate()
1072 t->mMixerChannelCount, t->mMixerInFormat, t->mMixerFormat); in process__validate()
1091 const std::shared_ptr<Track> &t = mTracks[name]; in process__validate() local
1092 if (!t->doesResample() && t->volumeRL == 0) { in process__validate()
1093 t->needs |= NEEDS_MUTE; in process__validate()
1094 t->hook = &Track::track__nop; in process__validate()
1104 const std::shared_ptr<Track> &t = mTracks[mEnabled[0]]; in process__validate() local
1107 t->mMixerChannelCount, t->mMixerInFormat, t->mMixerFormat); in process__validate()
1414 const std::shared_ptr<Track> &t = mTracks[group[0]]; in process__nop() local
1415 memset(t->mainBuffer, 0, in process__nop()
1417 t->mMixerChannelCount + t->mMixerHapticChannelCount, t->mMixerFormat)); in process__nop()
1421 const std::shared_ptr<Track> &t = mTracks[name]; in process__nop() local
1424 t->buffer.frameCount = outFrames; in process__nop()
1425 t->bufferProvider->getNextBuffer(&t->buffer); in process__nop()
1426 if (t->buffer.raw == NULL) break; in process__nop()
1427 outFrames -= t->buffer.frameCount; in process__nop()
1428 t->bufferProvider->releaseBuffer(&t->buffer); in process__nop()
1447 const std::shared_ptr<Track> &t = mTracks[name]; in process__genericNoResampling() local
1448 t->buffer.frameCount = mFrameCount; in process__genericNoResampling()
1449 t->bufferProvider->getNextBuffer(&t->buffer); in process__genericNoResampling()
1450 t->frameCount = t->buffer.frameCount; in process__genericNoResampling()
1451 t->mIn = t->buffer.raw; in process__genericNoResampling()
1460 const std::shared_ptr<Track> &t = mTracks[name]; in process__genericNoResampling() local
1462 if (CC_UNLIKELY(t->needs & NEEDS_AUX)) { in process__genericNoResampling()
1463 aux = t->auxBuffer + numFrames; in process__genericNoResampling()
1468 if (t->mIn == nullptr) { in process__genericNoResampling()
1471 size_t inFrames = (t->frameCount > outFrames)?outFrames:t->frameCount; in process__genericNoResampling()
1473 (t.get()->*t->hook)( in process__genericNoResampling()
1474 outTemp + (frameCount - outFrames) * t->mMixerChannelCount, in process__genericNoResampling()
1476 t->frameCount -= inFrames; in process__genericNoResampling()
1482 if (t->frameCount == 0 && outFrames) { in process__genericNoResampling()
1483 t->bufferProvider->releaseBuffer(&t->buffer); in process__genericNoResampling()
1484 t->buffer.frameCount = (mFrameCount - numFrames) - in process__genericNoResampling()
1486 t->bufferProvider->getNextBuffer(&t->buffer); in process__genericNoResampling()
1487 t->mIn = t->buffer.raw; in process__genericNoResampling()
1488 if (t->mIn == nullptr) { in process__genericNoResampling()
1491 t->frameCount = t->buffer.frameCount; in process__genericNoResampling()
1508 const std::shared_ptr<Track> &t = mTracks[name]; in process__genericNoResampling() local
1509 t->bufferProvider->releaseBuffer(&t->buffer); in process__genericNoResampling()
1528 const std::shared_ptr<Track> &t = mTracks[name]; in process__genericResampling() local
1530 if (CC_UNLIKELY(t->needs & NEEDS_AUX)) { in process__genericResampling()
1531 aux = t->auxBuffer; in process__genericResampling()
1537 if (t->needs & NEEDS_RESAMPLE) { in process__genericResampling()
1538 (t.get()->*t->hook)(outTemp, numFrames, mResampleTemp.get() /* naked ptr */, aux); in process__genericResampling()
1544 t->buffer.frameCount = numFrames - outFrames; in process__genericResampling()
1545 t->bufferProvider->getNextBuffer(&t->buffer); in process__genericResampling()
1546 t->mIn = t->buffer.raw; in process__genericResampling()
1549 if (t->mIn == nullptr) break; in process__genericResampling()
1551 (t.get()->*t->hook)( in process__genericResampling()
1552 outTemp + outFrames * t->mMixerChannelCount, t->buffer.frameCount, in process__genericResampling()
1555 outFrames += t->buffer.frameCount; in process__genericResampling()
1557 t->bufferProvider->releaseBuffer(&t->buffer); in process__genericResampling()
1573 const std::shared_ptr<Track> &t = mTracks[name]; in process__oneTrack16BitsStereoNoResampling() local
1575 AudioBufferProvider::Buffer& b(t->buffer); in process__oneTrack16BitsStereoNoResampling()
1577 int32_t* out = t->mainBuffer; in process__oneTrack16BitsStereoNoResampling()
1581 const int16_t vl = t->volume[0]; in process__oneTrack16BitsStereoNoResampling()
1582 const int16_t vr = t->volume[1]; in process__oneTrack16BitsStereoNoResampling()
1583 const uint32_t vrl = t->volumeRL; in process__oneTrack16BitsStereoNoResampling()
1586 t->bufferProvider->getNextBuffer(&b); in process__oneTrack16BitsStereoNoResampling()
1592 if ( AUDIO_FORMAT_PCM_FLOAT == t->mMixerFormat ) { in process__oneTrack16BitsStereoNoResampling()
1594 * t->mMixerChannelCount * audio_bytes_per_sample(t->mMixerFormat)); in process__oneTrack16BitsStereoNoResampling()
1597 * t->mMixerChannelCount * audio_bytes_per_sample(t->mMixerFormat)); in process__oneTrack16BitsStereoNoResampling()
1602 in, name, t->channelCount, t->needs, vrl, t->mVolume[0], t->mVolume[1]); in process__oneTrack16BitsStereoNoResampling()
1607 switch (t->mMixerFormat) { in process__oneTrack16BitsStereoNoResampling()
1645 LOG_ALWAYS_FATAL("bad mixer format: %d", t->mMixerFormat); in process__oneTrack16BitsStereoNoResampling()
1648 t->bufferProvider->releaseBuffer(&b); in process__oneTrack16BitsStereoNoResampling()
1814 const std::shared_ptr<Track> &t = mTracks[mEnabled[0]]; in process__noResampleOneTrack() local
1815 const uint32_t channels = t->mMixerChannelCount; in process__noResampleOneTrack()
1816 TO* out = reinterpret_cast<TO*>(t->mainBuffer); in process__noResampleOneTrack()
1817 TA* aux = reinterpret_cast<TA*>(t->auxBuffer); in process__noResampleOneTrack()
1818 const bool ramp = t->needsRamp(); in process__noResampleOneTrack()
1821 AudioBufferProvider::Buffer& b(t->buffer); in process__noResampleOneTrack()
1824 t->bufferProvider->getNextBuffer(&b); in process__noResampleOneTrack()
1831 * channels * audio_bytes_per_sample(t->mMixerFormat)); in process__noResampleOneTrack()
1834 in, &t, t->channelCount, t->needs); in process__noResampleOneTrack()
1839 t->volumeMix<MIXTYPE, is_same<TI, float>::value /* USEFLOATVOL */, false /* ADJUSTVOL */> ( in process__noResampleOneTrack()
1849 t->bufferProvider->releaseBuffer(&b); in process__noResampleOneTrack()
1852 t->adjustVolumeRamp(aux != NULL, is_same<TI, float>::value); in process__noResampleOneTrack()
1863 const std::shared_ptr<Track> &t = mTracks[name]; in processHapticData() local
1864 if (t->mHapticPlaybackEnabled) { in processHapticData()
1865 size_t sampleCount = mFrameCount * t->mMixerHapticChannelCount; in processHapticData()
1866 float gamma = t->getHapticScaleGamma(); in processHapticData()
1867 float maxAmplitudeRatio = t->getHapticMaxAmplitudeRatio(); in processHapticData()
1869 t->mMixerChannelCount, t->mMixerFormat); in processHapticData()
1870 switch (t->mMixerFormat) { in processHapticData()
1881 LOG_ALWAYS_FATAL("bad mMixerFormat: %#x", t->mMixerFormat); in processHapticData()