MLAudioInput
NameSpace: MagicLeap
Manages Audio.
Inherits from:
MLAutoAPISingleton< MLAudioInput >,
MLLazySingleton< T >
Public Fields
MicrophoneMuted
Gets or sets a value indicating whether the microphone is muted.
public static bool MicrophoneMuted { get; set; }
Public Methods
int GetChannels
Gets the channels of the capture type.
public static int GetChannels(
MicCaptureType captureType
)
Parameters
Type | Name | Description |
---|---|---|
MicCaptureType | captureType | The type of mic input to capture. |
int GetSampleRate
Gets the sample rate preferences of the device based on the capture type.
public static int GetSampleRate(
MicCaptureType captureType
)
Parameters
Type | Name | Description |
---|---|---|
MicCaptureType | captureType | The type of mic input to capture. |
delegate void OnMicrophoneMuteChangedDelegate
The delegate for the microphone mute changed event.
public delegate void OnMicrophoneMuteChangedDelegate(
bool muted
)
Parameters
Type | Name | Description |
---|---|---|
bool | muted | The new mute state of the microphone. |
Protected Methods
StopAPI
Called by MLAutoAPISingleton on destruction
protected virtual override MLResult.Code StopAPI()
Reimplements: StopAPI
Update
Called every device frame
protected virtual override void Update()
Reimplements: Update
Public Events
OnMicrophoneMuteChanged
Raised whenever the global microphone mute gets changed.
public static OnMicrophoneMuteChangedDelegate OnMicrophoneMuteChanged()
Public Enums
MicCaptureType
The type of mic input to capture.
Enumerator | Value | Description |
---|---|---|
VoiceComm | User voice, suitable for communications. Mono, 16 bit integer, 16k sampling rate. | |
VoiceCapture | High fidelity user voice, suitable for recording. Mono, 16 bit integer, 48k sampling rate. | |
WorldCapture | 4 | Mic mix representing the user's surroundings. Stereo, 16 bit integer, 48k sampling rate. |