37 |
* |
* |
38 |
* This class is used for routing audio signals between arbitrary sources |
* This class is used for routing audio signals between arbitrary sources |
39 |
* and destinations. You can either create a normal channel like: |
* and destinations. You can either create a normal channel like: |
40 |
* |
* @code |
41 |
* AudioChannel c1(512); // create unnamed channel |
* AudioChannel c1(512); // create unnamed channel |
42 |
* AudioChannel c2(512, "Effect send mono channel"); // create named channel |
* AudioChannel c2(512, "Effect send mono channel"); // create named channel |
43 |
* |
* @endcode |
44 |
* Or you can create a mix channel, e.g. the following would create a |
* Or you can create a mix channel, e.g. the following would create a |
45 |
* normal channel first, and the second channel is just a copy of the |
* normal channel first, and the second channel is just a copy of the |
46 |
* first channel: |
* first channel: |
47 |
* |
* @code |
48 |
* AudioChannel mono_chan(512, "Effect send channel"); // real channel |
* AudioChannel mono_chan(512, "Effect send channel"); // real channel |
49 |
* AudioChannel mix_chan(&mono_chan, "Effect send mono channel"); // mix channel |
* AudioChannel mix_chan(&mono_chan, "Effect send mono channel"); // mix channel |
50 |
* |
* @endcode |
51 |
* So in the last example, when writing to 'mix_chan' the signal will |
* So in the last example, when writing to 'mix_chan' the signal will |
52 |
* actually be mixed to the 'mono_chan' channel, so this is an easy way |
* actually be mixed to the 'mono_chan' channel, so this is an easy way |
53 |
* to downmix a signal source which has more audio channels than the |
* to downmix a signal source which has more audio channels than the |
90 |
inline float* Buffer() { return pBuffer; } ///< Audio signal buffer |
inline float* Buffer() { return pBuffer; } ///< Audio signal buffer |
91 |
inline AudioChannel* MixChannel() { return pMixChannel; } ///< In case this channel is a mix channel, then it will return a pointer to the real channel this channel refers to, NULL otherwise. |
inline AudioChannel* MixChannel() { return pMixChannel; } ///< In case this channel is a mix channel, then it will return a pointer to the real channel this channel refers to, NULL otherwise. |
92 |
inline void Clear() { memset(pBuffer, 0, uiBufferSize * sizeof(float)); } ///< Reset audio buffer with silence |
inline void Clear() { memset(pBuffer, 0, uiBufferSize * sizeof(float)); } ///< Reset audio buffer with silence |
93 |
|
void CopyTo(AudioChannel* pDst, const uint Samples); |
94 |
|
void CopyTo(AudioChannel* pDst, const uint Samples, const float fLevel); |
95 |
std::map<String,DeviceRuntimeParameter*> ChannelParameters(); |
std::map<String,DeviceRuntimeParameter*> ChannelParameters(); |
96 |
|
|
97 |
// constructors / destructor |
// constructors / destructor |