Previous Up Next

asSndInit
Defines the characteristics of the audio data that will be placed in the AsSnd.
This function (re)initializes the AsSnd in low-level mode.

AsSnd asSndInit (
AsSnd _sound_
I _channels_
I _frequency_
I _resolution_
I _flag_
)
Parameters

_sound_
Applicable AsSnd object
_channels_
Number of channels, 1 for mono, 2 for stereo.
_frequency_
Sampling frequency between 5000 Hz and 48000 Hz.
_resolution_
Sampling rate in bits, 8 or 16.
_flag_
Initialization flag.
Value Meaning
AS_SND_LINEAR Infinite buffer. The data read is then erased from memory. Useful for audio data that must be read only once.
AS_SND_CIRCULAR Dynamic audio data buffer.
Return value

The AsSnd given as a parameter, or nil in case of a failure.
Remark

Upon using this function and if the AsSnd has previously been used, all the audio data in the AsSnd will be removed from memory and thus lost for the user.