Skip to main content
Version: 12 Dec 2024

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

TypeNameDescription
MicCaptureTypecaptureTypeThe 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

TypeNameDescription
MicCaptureTypecaptureTypeThe type of mic input to capture.

delegate void OnMicrophoneMuteChangedDelegate

The delegate for the microphone mute changed event.

public delegate void OnMicrophoneMuteChangedDelegate(
bool muted
)

Parameters

TypeNameDescription
boolmutedThe 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.

EnumeratorValueDescription
VoiceCommUser voice, suitable for communications. Mono, 16 bit integer, 16k sampling rate.
VoiceCaptureHigh fidelity user voice, suitable for recording. Mono, 16 bit integer, 48k sampling rate.
WorldCapture4Mic mix representing the user's surroundings. Stereo, 16 bit integer, 48k sampling rate.