Class Sound

Sound that is fully kept in memory

class Sound
  : SeekableSound ;

Properties

NameTypeDescription
data[get] ubyte[]Raw byte data
dup[get] SoundMake exact copy of the sound
bitDepth[get] uintNumber of bits in each sample channel
channels[get] uintNumber of channels per sample
duration[get] doubleDuration, in seconds
sampleFormat[get] SampleFormatSample format
sampleRate[get] uintNumber of samples per second, in Hz
sampleSize[get] uintNumber of bytes in each sample (bitDepth / 8 * channels)
size[get] ulongNumber of samples

Methods

NameDescription
createSameFormat (ch, dur) Make empty sound of the same format
reset () Return to the start of a stream
stream (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.