Microphone:getSampleCount
Returns the number of audio samples the Microphone has recorded so far. This will be zero if the Microphone hasn't started recording yet, see Microphone:startRecording
.
There's a limit on the number of samples the Microphone is able to hold, which can be set at creation time in lovr.audio.newMicrophone
. While the Microphone is recording, be sure to call Microphone:getData
periodically to get a new chunk of audio in order to make room for more.
samples = Microphone:getSampleCount()
Arguments
None
Returns
Name | Type | Description |
samples | number | The number of recorded samples. |
See also
Microphone:getData
Microphone:isRecording
Microphone:startRecording
Microphone:stopRecording
lovr.audio.newMicrophone
Microphone