Audacity  2.2.0
Mix.h File Reference
#include "MemoryX.h"
#include <wx/string.h>
#include "SampleFormat.h"

Go to the source code of this file.

Classes

class  MixerSpec
 Class used with Mixer. More...
 
class  Mixer
 Functions for doing the mixdown of the tracks. More...
 
class  Mixer::WarpOptions
 

Functions

void MixAndRender (TrackList *tracks, TrackFactory *factory, double rate, sampleFormat format, double startTime, double endTime, std::unique_ptr< WaveTrack > &uLeft, std::unique_ptr< WaveTrack > &uRight)
 Mixes together all input tracks, applying any envelopes, amplitude gain, panning, and real-time effects in the process. More...
 
void MixBuffers (unsigned numChannels, int *channelFlags, float *gains, samplePtr src, samplePtr *dests, int len, bool interleaved)
 

Function Documentation

void MixAndRender ( TrackList tracks,
TrackFactory factory,
double  rate,
sampleFormat  format,
double  startTime,
double  endTime,
std::unique_ptr< WaveTrack > &  uLeft,
std::unique_ptr< WaveTrack > &  uRight 
)

Mixes together all input tracks, applying any envelopes, amplitude gain, panning, and real-time effects in the process.

Takes one or more tracks as input; of all the WaveTrack s that are selected, it mixes them together, applying any envelopes, amplitude gain, panning, and real-time effects in the process. The resulting pair of tracks (stereo) are "rendered" and have no effects, gain, panning, or envelopes. Other sorts of tracks are ignored. If the start and end times passed are the same this is taken as meaning no explicit time range to process, and the whole occupied length of the input tracks is processed.

: could we not use a SelectedTrackListOfKindIterator here?

References _(), Cancelled, Failed, TrackListIterator::First(), TrackListCondIterator::First(), Mixer::GetBuffer(), Track::GetChannel(), Track::GetEndTime(), Track::GetKind(), Track::GetLink(), Track::GetName(), Track::GetSelected(), Track::GetStartTime(), TrackList::GetTimeTrack(), Track::LeftChannel, Mixer::MixGetCurrentTime(), Track::MonoChannel, TrackFactory::NewWaveTrack(), TrackListIterator::Next(), Mixer::Process(), Track::RightChannel, Success, ProgressDialog::Update(), and Track::Wave.

Referenced by AudacityProject::HandleMixAndRender(), and Effect::Preview().

void MixBuffers ( unsigned  numChannels,
int *  channelFlags,
float *  gains,
samplePtr  src,
samplePtr *  dests,
int  len,
bool  interleaved 
)