audio_stop_recording


描述

This function will stop recording on the given recorder channel (the channel index is returned when you call the function audio_start_recording). When you stop recording, no further Audio Recording Asynchronous Events will be triggered for the given recorder channel, so you would normally use this function in the actual asynchronous event to ensure that you have captured all the data.

NOTE: Most platforms except HTML5 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_stop_recording(channel_index);


参数 描述
channel_index The index of the recorder channel to stop.


返回:

N/A(无返回值)


例如:

audio_stop_recording(audio_channel);

The above code tells GameMaker Studio 2 to stop recording on the given audio channel index.