InputSoundFile

Provide read access to sound files.

Constructors

this
this()

Default constructor.

Destructor

~this
~this()

Destructor.

Members

Functions

getChannelCount
uint getChannelCount()

Get the number of channels used by the sound

getSampleCount
long getSampleCount()

Get the total number of audio samples in the file

getSampleRate
uint getSampleRate()

Get the sample rate of the sound

openFromFile
bool openFromFile(const(char)[] filename)

Open a sound file from the disk for reading.

openFromMemory
bool openFromMemory(const(void)[] data)

Open a sound file in memory for reading.

openFromStream
bool openFromStream(InputStream stream)

Open a sound file from a custom stream for reading.

read
long read(short[] samples)

Read audio samples from the open file.

seek
void seek(long sampleOffset)

Change the current read position to the given sample offset.

seek
void seek(Duration timeOffset)

Change the current read position to the given time offset.

Meta