60 bool deleteSourceWhenDeleted);
89 int sourceChannelIndex);
102 int destChannelIndex);
127 void prepareToPlay (
int samplesPerBlockExpected,
double sampleRate)
override;
136 int requiredNumberOfChannels;
void setInputChannelMapping(int destChannelIndex, int sourceChannelIndex)
Creates an input channel mapping.
~ChannelRemappingAudioSource() override
Destructor.
Used to build a tree of elements representing an XML document.
int getRemappedOutputChannel(int outputChannelIndex) const
Returns the output channel to which channel outputChannelIndex of our input audio source will be sent...
ChannelRemappingAudioSource(AudioSource *source, bool deleteSourceWhenDeleted)
Creates a remapping source that will pass on audio from the given input.
void setNumberOfChannelsToProduce(int requiredNumberOfChannels)
Specifies a number of channels that this audio source must produce from its getNextAudioBlock() callb...
XmlElement * createXml() const
Returns an XML object to encapsulate the state of the mappings.
int getRemappedInputChannel(int inputChannelIndex) const
Returns the channel from our input that will be sent to channel inputChannelIndex of our input audio ...
Base class for objects that can produce a continuous stream of audio.
An AudioSource that takes the audio from another source, and re-maps its input and output channels to...
void getNextAudioBlock(const AudioSourceChannelInfo &) override
Called repeatedly to fetch subsequent blocks of audio data.
void clearAllMappings()
Clears any mapped channels.
Holds a pointer to an object which can optionally be deleted when this pointer goes out of scope...
void setOutputChannelMapping(int sourceChannelIndex, int destChannelIndex)
Creates an output channel mapping.
void restoreFromXml(const XmlElement &)
Restores the mappings from an XML object created by createXML().
void releaseResources() override
Allows the source to release anything it no longer needs after playback has stopped.
void prepareToPlay(int samplesPerBlockExpected, double sampleRate) override
Tells the source to prepare for playing.
Used by AudioSource::getNextAudioBlock().