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 const(short[])

Array of samples in memory

channelCount uint

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

sampleRate uint

Sample rate (number of samples to play per second)

Return Value

Type: bool

True if loading succeeded, false if it failed

Meta