SoundBuffer.loadFromSamples

Load the sound buffer from an array of audio samples.

The assumed format of the audio samples is 16 bits signed integer (short).

class SoundBuffer
bool
loadFromSamples
(
const(short[]) samples
,,
)

Parameters

samples
Type: const(short[])

Array of samples in memory

channelCount
Type: uint

Number of channels (1 = mono, 2 = stereo, ...)

sampleRate
Type: uint

Sample rate (number of samples to play per second)

Return Value

Type: bool

true if loading succeeded, false if it failed.

Meta