Microphone.GetPosition Manual     Reference     Scripting  
Scripting > Runtime Classes > Microphone
Microphone.GetPosition

static function GetPosition (deviceName : String) : int

Parameters

NameDescription
deviceName the name of the device. Passing null or an empty string will pick the default device. Get device names with Microphone.devices

Description

Get the position in samples of the recording.

You can use this to control latency. If you want a 30ms latency, poll getRecordPosition() until 30ms (in samples) has gone and then start the audio.