Moai SDK
1.5 revision 1 (MoaiEdition)
|
Inherits MOAILuaObject.
Function List | |
load | |
getInfo | |
getData | |
setData | |
setRawData | |
prepareBuffer |
Retrieve every sample data in buffer.
function getData ( MOAIUntzSampleBuffer self )
self | ( MOAIUntzSampleBuffer ) |
Returns attributes of sample buffer.
function getInfo ( MOAIUntzSampleBuffer self )
self | ( MOAIUntzSampleBuffer ) |
Loads a sound from disk.
function load ( MOAIUntzSampleBuffer self, string filename )
self | ( MOAIUntzSampleBuffer ) |
filename | ( string ) |
Allocate internal memory for sample buffer.
function prepareBuffer ( MOAIUntzSampleBuffer self, number channelCount, number frameCount, number sampleRate )
self | ( MOAIUntzSampleBuffer ) |
channelCount | ( number ) number of channels (mono=1, stereo=2) |
frameCount | ( number ) number of total frames of sample |
sampleRate | ( number ) sample rate in Hz (44100 or else) |
Write sample data into buffer.
function setData ( MOAIUntzSampleBuffer self, table data, number index )
self | ( MOAIUntzSampleBuffer ) |
data | ( table ) Array of sample data numbers ( -1 ~ 1 as sample level ) |
index | ( number ) Index within sample buffer to start copying from (1 for the first sample) |
Write raw sample data (array of 16bit short value) into buffer.
function ( MOAIUntzSampleBuffer self, string raw, number of, number index )
self | ( MOAIUntzSampleBuffer ) |
raw | ( string ) binary data that contains array of network byte ordered 16bit short value |
of | ( number ) bytes to read |
index | ( number ) of sample buffer start copying from (1 for the first sample) |