Mixer

Mixer which can mix several audio sources

Constructors

this
this()
Undocumented in source.

Members

Functions

addSource
void addSource(AudioSource source)

add source to mixer

loadData
bool loadData(int frameCount, ubyte* buf, uint flags)

load data into buffer

onFormatChanged
void onFormatChanged()

handle format change: pass same format to sources

removeSource
void removeSource(AudioSource source)

remove source from mixer

setSourceFormat
void setSourceFormat(AudioSource source)

pass current format to source

Inherited Members

From AudioSource

_lock
Mutex _lock;
Undocumented in source.
lock
void lock()
Undocumented in source. Be warned that the author may not have intended to support it.
unlock
void unlock()
Undocumented in source. Be warned that the author may not have intended to support it.
volume
float volume [@property getter]

get audio source volume (0 .. 1.0f)

volume
float volume [@property setter]

set audio source volume (0 .. 1.0f)

_volume
float _volume;
Undocumented in source.
_zeroVolume
bool _zeroVolume;
Undocumented in source.
_unityVolume
bool _unityVolume;
Undocumented in source.
sampleFormat
SampleFormat sampleFormat;
Undocumented in source.
samplesPerSecond
int samplesPerSecond;
Undocumented in source.
channels
int channels;
Undocumented in source.
bitsPerSample
int bitsPerSample;
Undocumented in source.
blockAlign
int blockAlign;
Undocumented in source.
calcParams
void calcParams()

recalculate some parameters after format change or after generation

setFormat
void setFormat(SampleFormat format, int channels, int samplesPerSecond, int bitsPerSample, int blockAlign)
Undocumented in source. Be warned that the author may not have intended to support it.
onFormatChanged
void onFormatChanged()
Undocumented in source. Be warned that the author may not have intended to support it.
putSamples
void putSamples(ubyte* buf, int sample1, int sample2)

put samples in int format

putSamples
void putSamples(ubyte* buf, float sample1, float sample2)

put samples in float format

generateSilence
void generateSilence(int frameCount, ubyte* buf)
Undocumented in source. Be warned that the author may not have intended to support it.
loadData
bool loadData(int frameCount, ubyte* buf, uint flags)

load data into buffer

Meta