Lines Matching defs:TrackBase

213     struct TrackBase {  struct
214 TrackBase() in TrackBase() function
219 virtual ~TrackBase() {} in ~TrackBase() argument
221 virtual uint32_t getOutputChannelCount() { return channelCount; } in getOutputChannelCount()
222 virtual uint32_t getMixerChannelCount() { return mMixerChannelCount; } in getMixerChannelCount()
224 bool needsRamp() { return (volumeInc[0] | volumeInc[1] | auxInc) != 0; } in needsRamp()
226 bool doesResample() const { return mResampler.get() != nullptr; } in doesResample()
228 void resetResampler() { if (mResampler.get() != nullptr) mResampler->reset(); } in resetResampler()
230 size_t getUnreleasedFrames() const { return mResampler.get() != nullptr ? in getUnreleasedFrames()
233 bool useStereoVolume() const { return channelMask == AUDIO_CHANNEL_OUT_STEREO in useStereoVolume()
245 uint32_t needs;
248 union {
253 int32_t prevVolume[MAX_NUM_VOLUMES];
254 int32_t volumeInc[MAX_NUM_VOLUMES];
255 int32_t auxInc;
256 int32_t prevAuxLevel;
257 int16_t auxLevel; // 0 <= auxLevel <= MAX_GAIN_INT, but signed for mul performance
259 uint16_t frameCount;
261 uint8_t channelCount; // 1 or 2, redundant with (needs & NEEDS_CHANNEL_COUNT__MASK)
262 uint8_t unused_padding; // formerly format, was always 16
263 uint16_t enabled; // actually bool
264 audio_channel_mask_t channelMask;
267 AudioBufferProvider* bufferProvider;
269 mutable AudioBufferProvider::Buffer buffer; // 8 bytes
271 hook_t hook;
272 const void *mIn; // current location in buffer
274 std::unique_ptr<AudioResampler> mResampler;
275 uint32_t sampleRate;
276 int32_t* mainBuffer;
277 int32_t* auxBuffer;
278 int32_t* teeBuffer;
280 int32_t sessionId;
282 audio_format_t mMixerFormat; // output mix format: AUDIO_FORMAT_PCM_(FLOAT|16_BIT)
283 audio_format_t mFormat; // input track format
284 audio_format_t mMixerInFormat; // mix internal format AUDIO_FORMAT_PCM_(FLOAT|16_BIT)
287 float mVolume[MAX_NUM_VOLUMES]; // floating point set volume
288 float mPrevVolume[MAX_NUM_VOLUMES]; // floating point previous volume
289 float mVolumeInc[MAX_NUM_VOLUMES]; // floating point volume increment
291 float mAuxLevel; // floating point set aux level
292 float mPrevAuxLevel; // floating point prev aux level
293 float mAuxInc; // floating point aux increment
295 audio_channel_mask_t mMixerChannelMask;
296 uint32_t mMixerChannelCount;
298 int32_t mTeeBufferFrameCount;
300 uint32_t mInputFrameSize; // The track input frame size, used for tee buffer
303 inline bool isVolumeMuted() const { in isVolumeMuted()