StreamedSound

Generalized sound stream class. This can be used to implement any type of sound, including compressed audio streams.

Members

Functions

reset
void reset()

Return to the start of a stream

stream
ulong stream(ubyte[] buffer)

Fill in the buffer with next portion of sound data. Function returns actual number of bytes written. At the end of a stream, zero is returned.

Properties

bitDepth
uint bitDepth [@property getter]

Number of bits in each sample channel

channels
uint channels [@property getter]

Number of channels per sample

sampleFormat
SampleFormat sampleFormat [@property getter]

Sample format

sampleRate
uint sampleRate [@property getter]

Number of samples per second, in Hz

sampleSize
uint sampleSize [@property getter]

Number of bytes in each sample (bitDepth / 8 * channels)

Meta