Previous Up Next

asRecorderInit
Defines the audio data characteristics that will be recorded in the AsRecorder
The samples recorded will be recuperated by a callback in the form of a character string, each of size '_size_', given in milliseconds.

AsRecorder asRecorderInit (
AsRecorder _recorder_
fun [AsRecorder u0 S] u1 _callback_
u0 _user_
I _size_
I _channels_
I _frequency _
I _resolution_
I _threshold_
I _flag_
)
Parameters

_recorder_
Object of type AsRecorder
_callback_
Recording callback providing the recorded audio data.
The additional parameter corresponds to the audio data.
_user_
User parameter.
_size_
Size of audio data transmitted to the callback in milliseconds.
_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.
_threshold_
Threshold volume for silence detection, between 0 (no silence detection) and 100.
If the volume of the recorded sound is below the threshold volume, it will not be transmitted to the callback.
_flag_
Unused, should be set to nil
Return value

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

If the AsRecorder had previously been used, it will be reinitialized upon using this method.