ALSAOutStream

Implements an ALSA output stream.

Constructors

this
this(ALSADevice dev)
Undocumented in source.

Destructor

~this
~this()
Undocumented in source.

Members

Functions

audioThread
void audioThread()
Undocumented in source. Be warned that the author may not have intended to support it.
runAudioThread
int runAudioThread()
Undocumented in source. Be warned that the author may not have intended to support it.
suspendAudioThread
int suspendAudioThread()
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

alsaerrCode
int alsaerrCode;

Contains the last ALSA specific error code.

buffer
ubyte[] buffer;

Buffer for outputting audio data.

bufferSize
uint bufferSize;

Contains buffer size in samples.

dev
ALSADevice dev;

Due to how ALSA works, the pcm handle is accessed from there directly, also keeps a reference of it to avoid calling the destructor.

Inherited Members

From OutputStream

_threadID
ThreadID _threadID;

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

errCode
int errCode;

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

statusCode
uint statusCode;

Internal state flags.

StatusFlags
enum StatusFlags
Undocumented in source.
threadID
ThreadID threadID [@property getter]

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

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)

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.

Meta