12#ifndef __AUDACITY_MIX__
13#define __AUDACITY_MIX__
37 using Stages = std::vector<MixerOptions::StageSpecification>;
41 std::shared_ptr<const WideSampleSequence> pSequence = {},
43 ) : pSequence{ move(pSequence) }, stages{ move(stages) }
46 std::shared_ptr<const WideSampleSequence>
pSequence;
65 const WarpOptions& warpOptions,
double startTime,
double stopTime,
66 unsigned numOutChannels,
size_t outBufferSize,
bool outInterleaved,
67 double outRate,
sampleFormat outFormat,
bool highQuality =
true,
70 ApplyVolume applyVolume = ApplyVolume::MapChannels);
93 size_t Process(
size_t maxSamples);
101 void Reposition(
double t,
bool bSkipping =
false);
104 void SetTimesAndSpeed(
105 double t0,
double t1,
double speed,
bool bSkipping =
false);
106 void SetSpeedForKeyboardScrubbing(
double speed,
double startTime);
110 double MixGetCurrentTime();
125 std::unique_ptr<EffectStage>& RegisterEffectStage(
137 std::pair<bool, sampleFormat>
138 NeedsDither(
bool needsDither,
double rate)
const;
151 bool mHasMixerSpec{
false};
168 std::vector<std::unique_ptr<EffectStage>>
mStages;
static const AttachedProjectObjects::RegisteredFactory masterEffects
Accumulates (non-interleaved) data during effect processing.
Upstream producer of sample streams, taking Buffers as external context.
Decorates a source with a non-timewarping effect, which may have latency.
Functions for doing the mixdown of the tracks.
std::unique_ptr< AudioGraph::Source > mDownmixStage
std::vector< EffectSettings > mSettings
const std::vector< SampleBuffer > mBuffer
std::vector< Input > Inputs
std::vector< std::unique_ptr< EffectStage > > mStages
const sampleFormat mFormat
AudioGraph::Buffers mTemp
const ApplyVolume mApplyVolume
const unsigned mNumChannels
sampleFormat mEffectiveFormat
std::unique_ptr< AudioGraph::Source > mMasterDownmixStage
std::vector< MixerOptions::StageSpecification > Stages
const std::optional< Stages > mMasterEffects
Mixer(const Mixer &)=delete
std::vector< AudioGraph::Buffers > mStageBuffers
std::vector< MixerSource > mSources
Mixer(Mixer &&) noexcept=delete
const std::shared_ptr< TimesAndSpeed > mTimesAndSpeed
A matrix of booleans, one row per input channel, column per output.
A flat linked list of tracks supporting Add, Remove, Clear, and Contains, serialization of the list o...
Positions or offsets within audio files need a wide type.
Immutable structure is an argument to Mixer's constructor.