API reference
API reference
Select your platform
No SDKs available
No versions available

Mic Class

Extends MonoBehaviour, IAudioInputSource, BaseAudioClipInput, ILogSource
A simple mic playback class

Properties

IVLogger Logger[Get]
List of all the available Mic devices
Index of the current Mic device in m_Devices
Gets the name of the Mic device currently in use
bool IsMuted[Get]
int AudioClipSampleRate[Get]

Fields

The audio clip obtained from Microphone.Start
The current clip position of the
Always allow initial activation
Due to Microphone.Start & Microphone.End taking so long, activate on enable
Searches for mics for this long following an activation request.
Total amount of seconds included within the mic audio clip buffer
Getter for audio mic sample audio capture in samples per second
bool IsRecording[Get]
AudioEncoding AudioEncoding[Get]
bool IsInputAvailable[Get]

Events

Action OnStartRecording
Action OnStartRecordingFailed
Action< int, float[], float > OnSampleReady
Action OnStopRecording
Action OnMicMuted
Action OnMicUnmuted

Member Functions

Sets the new audio sample rate if possible
Parameters
newSampleRate
New sample rate
Changes to a Mic device for Recording
Parameters
index
The index of the Mic device. Refer to Devices
Begins reading with a specified number of ms per sample
Stop recording audio from the provided mic source
void CheckForInput ( )

Protected Functions

Wait for devices to exist & then start mic
Stop microphone for deactivation
virtual void SetMuted
( bool muted )
Did you find this page helpful?
Thumbs up icon
Thumbs down icon