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