28 return XO(
"Converts stereo tracks to mono");
67 bool bGoodResult =
true;
73 auto trackRange = outputs.Get().Selected<
WaveTrack>();
74 for (
const auto left : trackRange)
76 if (left->Channels().size() > 1)
79 auto end = left->TimeToLongSamples(left->GetEndTime());
80 totalTime += (
end - start);
89 for (
const auto track : trackRange)
91 if (track->Channels().size() > 1)
93 if (!
ProcessOne(outputs.Get(), curTime, totalTime, *track))
120 move(
tracks), std::nullopt,
133 while (
auto blockLen = mixer.Process())
135 auto buffer = mixer.GetBuffer();
136 for (
auto i = 0; i < blockLen; i++)
137 ((
float*)buffer)[i] /= denominator;
153 track.
Paste(start, *outTrack);
Toolkit-neutral facade for basic user interface services.
std::vector< MixerOptions::StageSpecification > GetEffectStages(const WaveTrack &track)
virtual void SetMessage(const TranslatableString &message)=0
Change an existing dialog's message.
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
const TrackList * inputTracks() const
BasicUI::ProgressDialog * mProgress
std::shared_ptr< TrackList > mTracks
bool TotalProgress(double frac, const TranslatableString &={}) const
Performs effect computation.
Use this object to copy the input tracks to tentative outputTracks.
Functions for doing the mixdown of the tracks.
std::vector< Input > Inputs
static RealtimeEffectList & Get(AudacityProject &project)
void Clear()
Use only in the main thread. Sends Remove messages.
unsigned GetAudioInCount() const override
How many input buffers to allocate at once.
unsigned GetAudioOutCount() const override
How many output buffers to allocate at once.
bool IsInteractive() const override
Whether the effect needs a dialog for entry of settings.
ComponentInterfaceSymbol GetSymbol() const override
TranslatableString GetDescription() const override
static const ComponentInterfaceSymbol Symbol
EffectType GetType() const override
Type determines how it behaves.
bool IsHiddenFromMenus() const override
Default is false.
bool Process(EffectInstance &instance, EffectSettings &settings) override
bool ProcessOne(TrackList &outputs, sampleCount &curTime, sampleCount totalTime, WaveTrack &track)
std::shared_ptr< Subclass > SharedPointer()
A flat linked list of tracks supporting Add, Remove, Clear, and Contains, serialization of the list o...
AudacityProject * GetOwner()
static TrackListHolder Temporary(AudacityProject *pProject, const Track::Holder &pTrack={})
Holds a msgid for the translation catalog; may also bind format arguments.
A Track that contains audio waveform data.
void MakeMono()
Simply discard any right channel.
double GetStartTime() const override
Implement WideSampleSequence.
float GetChannelVolume(int channel) const override
Takes volume and pan into account.
void Clear(double t0, double t1) override
void Paste(double t0, const Track &src) override
double GetEndTime() const override
Implement WideSampleSequence.
double GetRate() const override
size_t GetMaxBlockSize() const
Holder EmptyCopy(size_t nChannels, const SampleBlockFactoryPtr &pFactory={}) const
sampleCount TimeToLongSamples(double t0) const
Positions or offsets within audio files need a wide type.
const char * end(const char *str) noexcept
Externalized state of a plug-in.
Immutable structure is an argument to Mixer's constructor.