#include <AudioChannel.h>
Classes | |
| class | ParameterIsMixChannel |
| class | ParameterMixChannelDestination |
| class | ParameterName |
Public Member Functions | |
| float * | Buffer () |
| Audio signal buffer. | |
| void | SetBuffer (float *pBuffer) |
| AudioChannel * | MixChannel () |
| In case this channel is a mix channel, then it will return a pointer to the real channel this channel refers to, NULL otherwise. | |
| void | Clear () |
| Reset audio buffer with silence. | |
| void | Clear (uint Samples) |
| Reset audio buffer with silence. | |
| void | CopyTo (AudioChannel *pDst, const uint Samples) |
| Copies audio data (unmodified) from this AudioChannel to the given destination AudioChannel. | |
| void | CopyTo (AudioChannel *pDst, const uint Samples, const float fLevel) |
| Copies audio data from this AudioChannel to the given destination AudioChannel and applies the given volume coefficient to the destination audio signal. | |
| void | MixTo (AudioChannel *pDst, const uint Samples) |
| Copies audio data (unmodified) from this AudioChannel and mixes it to the given destination AudioChannel. | |
| void | MixTo (AudioChannel *pDst, const uint Samples, const float fLevel) |
| Copies audio data from this AudioChannel, applies the given volume coefficient to the audio signal and mixes it to the given destination channel. | |
| std::map< String, DeviceRuntimeParameter * > | ChannelParameters () |
| AudioChannel (uint ChannelNr, uint BufferSize) | |
| Create real channel. | |
| AudioChannel (uint ChannelNr, float *pBuffer, uint BufferSize) | |
| Create channel with external (already existing) audio buffer. | |
| AudioChannel (uint ChannelNr, AudioChannel *pMixChannelDestination) | |
| Create mix channel. | |
| virtual | ~AudioChannel () |
| Destructor. | |
Protected Attributes | |
| uint | ChannelNr |
| std::map< String, DeviceRuntimeParameter * > | Parameters |
This class is used for routing audio signals between arbitrary sources and destinations. You can either create a normal channel like:
AudioChannel c1(512); // create unnamed channel AudioChannel c2(512, "Effect send mono channel"); // create named channel
AudioChannel mono_chan(512, "Effect send channel"); // real channel AudioChannel mix_chan(&mono_chan, "Effect send mono channel"); // mix channel
Definition at line 56 of file AudioChannel.h.
| LinuxSampler::AudioChannel::AudioChannel | ( | uint | ChannelNr, | |
| uint | BufferSize | |||
| ) |
Create real channel.
| ChannelNr | - channel number of this new channel | |
| BufferSize | - desired audio data buffer size |
Definition at line 44 of file AudioChannel.cpp.
References LinuxSampler::Thread::allocAlignedMem(), Clear(), and Parameters.
| LinuxSampler::AudioChannel::AudioChannel | ( | uint | ChannelNr, | |
| float * | pBuffer, | |||
| uint | BufferSize | |||
| ) |
Create channel with external (already existing) audio buffer.
| ChannelNr | - channel number of this new channel | |
| pBuffer | - external audio buffer | |
| BufferSize | - size of the external buffer |
Definition at line 64 of file AudioChannel.cpp.
References Clear(), and Parameters.
| LinuxSampler::AudioChannel::AudioChannel | ( | uint | ChannelNr, | |
| AudioChannel * | pMixChannelDestination | |||
| ) |
Create mix channel.
| ChannelNr | - channel number of this new channel | |
| pMixChannelDestination | - a real audio channel this new mix channel refers to |
Definition at line 84 of file AudioChannel.cpp.
References Buffer(), Clear(), and Parameters.
| LinuxSampler::AudioChannel::~AudioChannel | ( | ) | [virtual] |
Destructor.
Definition at line 101 of file AudioChannel.cpp.
References LinuxSampler::Thread::freeAlignedMem(), and Parameters.
| float* LinuxSampler::AudioChannel::Buffer | ( | ) | [inline] |
Audio signal buffer.
Definition at line 90 of file AudioChannel.h.
Referenced by AudioChannel(), CopyTo(), and MixTo().
| std::map< String, DeviceRuntimeParameter * > LinuxSampler::AudioChannel::ChannelParameters | ( | ) |
| void LinuxSampler::AudioChannel::Clear | ( | uint | Samples | ) | [inline] |
| void LinuxSampler::AudioChannel::Clear | ( | ) | [inline] |
Reset audio buffer with silence.
Definition at line 93 of file AudioChannel.h.
Referenced by AudioChannel().
| void LinuxSampler::AudioChannel::CopyTo | ( | AudioChannel * | pDst, | |
| const uint | Samples, | |||
| const float | fLevel | |||
| ) |
Copies audio data from this AudioChannel to the given destination AudioChannel and applies the given volume coefficient to the destination audio signal.
Caution: This method will overwrite the content in the destination channel buffer.
| pDst | - destination channel | |
| Samples | - amount of sample points to be copied | |
| fLevel | - volume coefficient to be applied |
Definition at line 133 of file AudioChannel.cpp.
| void LinuxSampler::AudioChannel::CopyTo | ( | AudioChannel * | pDst, | |
| const uint | Samples | |||
| ) |
Copies audio data (unmodified) from this AudioChannel to the given destination AudioChannel.
Caution: This method will overwrite the content in the destination channel buffer.
| pDst | - destination channel | |
| Samples | - amount of sample points to be copied |
Definition at line 117 of file AudioChannel.cpp.
References Buffer().
Referenced by CopyTo().
| AudioChannel* LinuxSampler::AudioChannel::MixChannel | ( | ) | [inline] |
In case this channel is a mix channel, then it will return a pointer to the real channel this channel refers to, NULL otherwise.
Definition at line 92 of file AudioChannel.h.
| void LinuxSampler::AudioChannel::MixTo | ( | AudioChannel * | pDst, | |
| const uint | Samples, | |||
| const float | fLevel | |||
| ) |
Copies audio data from this AudioChannel, applies the given volume coefficient to the audio signal and mixes it to the given destination channel.
| pDst | - destination channel | |
| Samples | - amount of sample points to be mixed over | |
| fLevel | - volume coefficient to be applied |
Definition at line 191 of file AudioChannel.cpp.
| void LinuxSampler::AudioChannel::MixTo | ( | AudioChannel * | pDst, | |
| const uint | Samples | |||
| ) |
Copies audio data (unmodified) from this AudioChannel and mixes it to the given destination AudioChannel.
| pDst | - destination channel | |
| Samples | - amount of sample points to be mixed over |
Definition at line 163 of file AudioChannel.cpp.
References Buffer().
Referenced by MixTo().
| void LinuxSampler::AudioChannel::SetBuffer | ( | float * | pBuffer | ) | [inline] |
Definition at line 91 of file AudioChannel.h.
uint LinuxSampler::AudioChannel::ChannelNr [protected] |
Definition at line 107 of file AudioChannel.h.
std::map<String,DeviceRuntimeParameter*> LinuxSampler::AudioChannel::Parameters [protected] |
Definition at line 108 of file AudioChannel.h.
Referenced by AudioChannel(), ChannelParameters(), and ~AudioChannel().