audio_start_recording(recorder_index);
Argument | Description |
---|---|
recorder_index | The index of the recorder source to use. |
Returns: Index
This function will start recording audio from the recorder source indexed. You can get the number of recorder sources using the function audio_get_recorder_count(), and once you start recording the audio will be stored in a temporary buffer and start triggering an Audio Recording Asynchronous Event. This event is triggered every step that recording takes place and will create the special ds_map in the variable async_load with the following key/value pairs:
Note that after the asynchronous event has been triggered, the audio in the temporary buffer will be wiped, so you should be copying it's data into a custom buffer that you have previously created.
NOTE: Most platforms support recording audio in some form, but that does not mean that all devices will permit it, even if the platform does, so you should always check that the audio_get_recorder_count() function returns a value greater than 0 to verify that recording devices are available before using the rest of the recording functions.
audio_record = audio_start_recording(0);
The above code starts recording from the recorder source 0, storing the channel index of the recording in the variable "audio_record" for use in the asynchronous Audio Recording event.