OutputStream

Defines an output stream for audio output. Periodically calls a callback function (delegate) as long as the stream isn't shut down.

Members

Enums

StatusFlags
enum StatusFlags
Undocumented in source.

Functions

runAudioThread
int runAudioThread()

Runs the audio thread. This either means that it'll create a new low-level thread to feed the stream a steady amount of data, or use whatever the backend on the OS has.

suspendAudioThread
int suspendAudioThread()

Suspends the audio thread by allowing it to escape normally and close things safely, or suspending it on the backend.

Properties

threadID
ThreadID threadID [@property getter]

Returns the thread ID of the stream thread. Warning: It is not advised to join this thread.

Variables

_threadID
ThreadID _threadID;

The ID of the audio thread if there's any.

callback_buffer
void delegate(ubyte[] buffer) callback_buffer;

Called periodically request more data to device output. Target must not call any functions that either suspend the thread, or would impact real-time performance (disk operations, etc).

callback_onBufferUnderflow
void delegate() callback_onBufferUnderflow;

Called when a buffer underflow error have occured. (Optional)

errCode
int errCode;

The last error code that was encountered, or 0 if none.

statusCode
uint statusCode;

Internal state flags.

Meta