#include <cstdint>
#include "ear/wavechunks.h"
Go to the source code of this file.
|
| class | EarSdlVoice |
| | A buffer of samples the mixer plays, as a secondary buffer of DirectSound plays in the original. More...
|
|
| constexpr int | EAR_MIX_RATE = 22050 |
| | The frames a second EAR mixes at, the format it gives the primary buffer of DirectSound.
|
| constexpr int | EAR_MIX_CHANNELS = 2 |
| | The channels EAR mixes, the format it gives the primary buffer of DirectSound.
|
◆ EarSetSdlMixerOffline()
| void EarSetSdlMixerOffline |
( |
bool | offline | ) |
|
Select whether the mixer renders on request, through EarRenderSdlMixer(), rather than to the default playback device.
The choice applies when the mixer opens.
- Parameters
-
| offline | Whether to render on request. |
◆ EarOpenSdlMixer()
Open the mixer, and the default playback device unless it renders on request.
- Returns
- Whether the mixer opened.
◆ EarCloseSdlMixer()
| void EarCloseSdlMixer |
( |
| ) |
|
Close the mixer and its device, and delete every buffer.
◆ EarSetSdlMixerEnabled()
| void EarSetSdlMixerEnabled |
( |
bool | enabled | ) |
|
Enable or suspend sound-effect mixing and playback updates without discarding voices.
- Parameters
-
| enabled | Whether mixing should advance; a live output stream is resumed or paused too. |
◆ EarSdlMixerEnabled()
| bool EarSdlMixerEnabled |
( |
| ) |
|
- Returns
- Whether sound-effect mixing and playback updates are enabled.
◆ EarRenderSdlMixer()
| void EarRenderSdlMixer |
( |
std::int16_t * | samples, |
|
|
int | frames ) |
Mix frames of a mixer that renders on request, and advance its clock by their time.
- Parameters
-
| samples | The interleaved stereo 16-bit samples, two for each frame. |
| frames | The frames to mix. |
◆ EAR_MIX_RATE
The frames a second EAR mixes at, the format it gives the primary buffer of DirectSound.
◆ EAR_MIX_CHANNELS
The channels EAR mixes, the format it gives the primary buffer of DirectSound.