sf.SoundBuffer Class Reference
sf.SoundBuffer is the low-level for loading and manipulating sound buffers.
Default constructor : SoundBuffer()
Copy constructor : SoundBuffer(Copy) where Copy is a sf.SoundBuffer instance.
Methods
GetChannelsCount()
Return the number of channels (1 = mono, 2 = stereo).
GetDuration()
Get the sound duration.
GetSampleRate()
Get the sound frequency (sample rate).
GetSamples()
Return the sound samples as a string.
GetSamplesCount()
Return the samples count.
LoadFromFile(FileName)
Load the sound buffer from a file. Returns True if loading has been successful.
Filename : Path of the sound file to load
LoadFromMemory(Data)
Load the sound buffer from a string in memory.
Data : string representing the file data in memory
LoadFromSamples(Samples, ChannelsCount, SampleRate)
Load the sound buffer from an array of samples - assumed format for samples is 16 bits signed integer.
Samples : Pointer to the samples in memory
ChannelsCount : Number of channels (1 = mono, 2 = stereo, ...)
SampleRate : Frequency (number of samples to play per second)
SaveToFile(Filename)
Save the sound buffer to a file. Returns True if saving has been successful.
Filename : Path of the sound file to write