This abstract class is able to mix audiosignals with same channel count and sample rate and convert it to a specific output format.
More...
#include <Mixer.h>
|
| Mixer (DeviceSpecs specs) |
| Creates the mixer.
|
|
virtual | ~Mixer () |
| Destroys the mixer.
|
|
DeviceSpecs | getSpecs () const |
| Returns the target specification for superposing.
|
|
void | setSpecs (Specs specs) |
| Sets the target specification for superposing.
|
|
void | setSpecs (DeviceSpecs specs) |
| Sets the target specification for superposing.
|
|
void | mix (sample_t *buffer, int start, int length, float volume) |
| Mixes a buffer.
|
|
void | mix (sample_t *buffer, int start, int length, float volume_to, float volume_from) |
| Mixes a buffer with linear volume interpolation.
|
|
void | read (data_t *buffer, float volume) |
| Writes the mixing buffer into an output buffer.
|
|
void | clear (int length) |
| Clears the mixing buffer.
|
|
This abstract class is able to mix audiosignals with same channel count and sample rate and convert it to a specific output format.
◆ clear()
void Mixer::clear |
( |
int | length | ) |
|
Clears the mixing buffer.
- Parameters
-
length | The length of the buffer in samples. |
◆ getSpecs()
Returns the target specification for superposing.
- Returns
- The target specification.
◆ mix() [1/2]
void Mixer::mix |
( |
sample_t * | buffer, |
|
|
int | start, |
|
|
int | length, |
|
|
float | volume ) |
Mixes a buffer.
- Parameters
-
buffer | The buffer to superpose. |
start | The start sample of the buffer. |
length | The length of the buffer in samples. |
volume | The mixing volume. Must be a value between 0.0 and 1.0. |
◆ mix() [2/2]
void Mixer::mix |
( |
sample_t * | buffer, |
|
|
int | start, |
|
|
int | length, |
|
|
float | volume_to, |
|
|
float | volume_from ) |
Mixes a buffer with linear volume interpolation.
- Parameters
-
buffer | The buffer to superpose. |
start | The start sample of the buffer. |
length | The length of the buffer in samples. |
volume_to | The target mixing volume. Must be a value between 0.0 and 1.0. |
volume_from | The start mixing volume. Must be a value between 0.0 and 1.0. |
◆ read()
void Mixer::read |
( |
data_t * | buffer, |
|
|
float | volume ) |
Writes the mixing buffer into an output buffer.
- Parameters
-
buffer | The target buffer for superposing. |
volume | The mixing volume. Must be a value between 0.0 and 1.0. |
◆ setSpecs() [1/2]
Sets the target specification for superposing.
- Parameters
-
specs | The target specification. |
◆ setSpecs() [2/2]
void Mixer::setSpecs |
( |
Specs | specs | ) |
|
Sets the target specification for superposing.
- Parameters
-
specs | The target specification. |
The documentation for this class was generated from the following file: