AudioOutput

Gives PCM output access (such as the speakers).

Constructors

this
this(string device, int SampleRate, int channels)

device is a device name. On Linux, it is the ALSA string. On Windows, it is currently ignored, so you should pass "default" or null so when it does get implemented your code won't break.

this
this(int card, int SampleRate, int channels)

Always pass card == 0.

Destructor

A destructor is present on this object, but not explicitly documented in the source.

Postblit

A postblit is present on this object, but not explicitly documented in the source.

Members

Functions

close
void close()

Closes the audio device. You MUST call stop before calling this.

open
void open()

Re-opens the audio device that you have previously closed.

pause
void pause()
play
void play()

Starts playing, loops until stop is called

stop
void stop()

Breaks the play loop

unpause
void unpause()

Variables

fillData
void delegate(short[]) fillData;

passes a buffer of data to fill

Suggestion Box / Bug Report