Mixing of sound samples. More...
#include "stdafx.h"#include "core/math_func.hpp"Go to the source code of this file.
Data Structures | |
| struct | MixerChannel |
Functions | |
| template<typename T > | |
| static int | RateConversion (T *b, int frac_pos) |
| Perform the rate conversion between the input and output. | |
| static void | mix_int16 (MixerChannel *sc, int16 *buffer, uint samples) |
| static void | mix_int8_to_int16 (MixerChannel *sc, int16 *buffer, uint samples) |
| static void | MxCloseChannel (MixerChannel *mc) |
| void | MxMixSamples (void *buffer, uint samples) |
| MixerChannel * | MxAllocateChannel () |
| void | MxSetChannelRawSrc (MixerChannel *mc, int8 *mem, size_t size, uint rate, bool is16bit) |
| void | MxSetChannelVolume (MixerChannel *mc, uint left, uint right) |
| void | MxActivateChannel (MixerChannel *mc) |
| bool | MxInitialize (uint rate) |
Variables | |
| static MixerChannel | _channels [8] |
| static uint32 | _play_rate = 11025 |
| static uint32 | _max_size = UINT_MAX |
| static const int | MAX_VOLUME = 128 * 128 |
| The theoretical maximum volume for a single sound sample. | |
Mixing of sound samples.
Definition in file mixer.cpp.
| static int RateConversion | ( | T * | b, | |
| int | frac_pos | |||
| ) | [inline, static] |
Perform the rate conversion between the input and output.
| b | the buffer to read the data from | |
| frac_pos | the position from the begin of the buffer till the next element |
| T | the size of the buffer (8 or 16 bits) |
const int MAX_VOLUME = 128 * 128 [static] |
1.6.1