initAudioRecord

fun initAudioRecord(audioFormat: Int, channelCount: Int, sampleRate: Int): Boolean

Initializes the AudioRecord used to capture the playback audio.

This is handled automatically when used as an audio buffer callback, and does not need to be called manually.

Return

true if the audio record was successfully created and started. Returns false if audio capture is unavailable (for example, if the media projection has been stopped, or the capturer has been released), in which case no audio will be mixed.