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 the detection of null sound value.
If the volume of the recorded sound is below the threshold volume, it will not be transmitted to the callback.
Values between 0 ( no detection of null sound values ) and 100.
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.