ModuleManager

Manages all audio modules complete with routing, MIDI2.0, etc.

Members

Functions

addModule
void addModule(AudioModule md, size_t[] inBuffs, size_t[] outBuffs)

Adds a plugin to the list.

lockAudioThread
void lockAudioThread()

Locks the manager and all audio modules within it to avoid interference from GC.

midiReceive
void midiReceive(uint[4] data, uint offset)

MIDI commands are received here from modules.

put
void put(void* userdata, ubyte* stream, int len)

Puts the output to the final destination.

renderFrame
void renderFrame()

Renders a single frame of audio.

setBuffers
void setBuffers(size_t num)

Sets up a specific number of buffers.

unlockAudioThread
void unlockAudioThread()

Unlocks the manager and all audio modules within it to allow GC allocation, which is needed for loading, etc.

Variables

bufferSize
int bufferSize;

Rendering buffer size in samples, also the length of a single frame.

buffers
float[][] buffers;

List of the buffers themselves.

currFrame
int currFrame;

Current audio frame.

devHandler
AudioDeviceHandler devHandler;

Pointer to the audio device handler.

finalBuffers
float[][] finalBuffers;

Final buffers.

inBufferList
float*[][] inBufferList;

List of pointers to input buffers.

moduleList
AudioModule[] moduleList;

List of modules.

nOfFrames
int nOfFrames;

Number of maximum frames that can be put into the output buffer.

outBufferList
float*[][] outBufferList;

List of pointers to output buffers.

outBufferSize
int outBufferSize;

Output buffer size in samples.

Meta