14#ifndef __AUDACITY_MIXER_SOURCE__
15#define __AUDACITY_MIXER_SOURCE__
41 MixerSource(
const std::shared_ptr<const WideSampleSequence> &leader,
44 bool mayThrow, std::shared_ptr<TimesAndSpeed> pTimesAndSpeed,
58 std::optional<size_t>
Acquire(
Buffers &data,
size_t bound)
override;
86 size_t MixSameRate(
unsigned nChannels,
size_t maxOut,
float *floatBuffers[]);
93 unsigned nChannels,
size_t maxOut,
float *floatBuffers[]);
98 void ZeroFill(
size_t produced,
size_t max,
float &floatBuffer);
100 const std::shared_ptr<const WideSampleSequence>
mpLeader;
Upstream producer of sample streams, taking Buffers as external context.
AudioGraph::Buffers Buffers
std::vector< double > mEnvValues
Gain envelopes are applied to input before other transformations.
unsigned Channels() const
int mQueueStart
Position of the start of the next block to resample.
int mQueueLen
The number of available samples after the queue start.
const ResampleParameters mResampleParameters
const BoundedEnvelope *const mEnvelope
Resampling, as needed, after gain envelope.
const std::shared_ptr< TimesAndSpeed > mTimesAndSpeed
std::vector< std::vector< float > > mSampleQueue
First intermediate buffer when resampling is needed.
sampleCount Remaining() const override
Result includes any amount Acquired and not yet Released.
MixerSource & operator=(MixerSource &&)=delete
const std::shared_ptr< const WideSampleSequence > mpLeader
size_t MixSameRate(unsigned nChannels, size_t maxOut, float *floatBuffers[])
static constexpr size_t sQueueMaxLen
bool AcceptsBlockSize(size_t blockSize) const override
MixerSource(const std::shared_ptr< const WideSampleSequence > &leader, size_t bufferSize, double rate, const MixerOptions::Warp &options, bool highQuality, bool mayThrow, std::shared_ptr< TimesAndSpeed > pTimesAndSpeed, const ArrayOf< bool > *pMap)
bool AcceptsBuffers(const Buffers &buffers) const override
size_t MixVariableRates(unsigned nChannels, size_t maxOut, float *floatBuffers[])
static constexpr size_t sProcessLen
bool Terminates() const override
const ArrayOf< bool > *const mpMap
bool VariableRates() const
bool Release() override
Caller is done examining last Acquire()d positions.
std::vector< std::unique_ptr< Resample > > mResample
MixerSource(MixerSource &&)=default
void Reposition(double time, bool skipping)
unsigned mMaxChannels
Remember how many channels were passed to Acquire()
void ZeroFill(size_t produced, size_t max, float &floatBuffer)
const bool * MixerSpec(unsigned iChannel) const
std::optional< size_t > Acquire(Buffers &data, size_t bound) override
Occupy vacant space in Buffers with some data.
sampleCount mSamplePos
Fetch position for source.
const WideSampleSequence & GetSequence() const
Positions or offsets within audio files need a wide type.
Immutable structure is an argument to Mixer's constructor.