roMicrophoneEvent

The roMicrophone component sends the roMicrophoneEvent with the following predicates that indicate its valid event types:

Supported methods

IsRecordingDone() as Boolean

Checks if the microphone recording session has been closed. This method returns true if the recording session is closed; otherwise, it returns false.

IsRecordingInfo() as Boolean

Checks whether the microphone is open. This method returns true when the microphone is open; otherwise, it returns false.

GetInfo() as Object

Returns the information regarding a particular microphone recording session. This method returns an roAssociativeArray containing the following information:

KeyTypeValue
formatstringThe audio data format (ex. pcm-s16-le)
num_channelsintegerThe number of channels (ex. 1 for mono)
sample_rateintegerThe audio sample rate (ex. 16000 for 16kHz)
sample_dataroByteArraySigned 16-bit integer containing audio data as PCM (little-endian format)
levelintegerValue displaying a calculated volume level between 0 (silence) and 100 (maximum)