Mic Muting
Module: Audio / Audio Definitions / Audio Output / Audio Input
Functions
Name | |
---|---|
MLResult | MLAudioSetMicMute(bool is_muted) Sets the global input mute state for all input streams. |
MLResult | MLAudioGetMicMute(bool * out_is_muted) Queries the global input mute state for all input streams. |
MLResult | MLAudioSetMicMuteCallback(MLAudioMicMuteCallback callback, void * context) Registers a callback for changes to the global input mute state. |
Detailed Description
MIC MUTING.
Functions Documentation
MLAudioSetMicMute
MLResult MLAudioSetMicMute(
bool is_muted
)
Sets the global input mute state for all input streams.
Parameters
bool | is_muted | If true, capture streams will be muted globally. |
Returns
MLResult | MLResult_Ok | Successfully set the value. |
MLResult | MLResult_PermissionDenied | Failed due to lack of permission. |
MLResult | MLResult_UnspecifiedFailure | Failed due to an unknown error. |
MLResult | MLAudioResult_NotImplemented | Failed because feature has not been implemented yet. |
Required Permissions:
- android.permission.RECORD_AUDIO (protection level: dangerous)
The global input mute applies to all input streams, including microphones, Virtual Capture and Mixed Capture. Any app with capture privileges can set it, and it will apply for all apps.
MLAudioGetMicMute
MLResult MLAudioGetMicMute(
bool * out_is_muted
)
Queries the global input mute state for all input streams.
Parameters
bool * | out_is_muted | If true, capture streams are muted globally. |
Returns
MLResult | MLResult_AllocFailed | Failed due to memory allocation failure. |
MLResult | MLResult_InvalidParam | Failed due to an invalid parameter. |
MLResult | MLResult_Ok | Successfully retrieved the value. |
MLResult | MLResult_PermissionDenied | Failed due to lack of permission. |
MLResult | MLResult_UnspecifiedFailure | Failed due to an unknown error. |
MLResult | MLAudioResult_NotImplemented | Failed because feature has not been implemented yet. |
Required Permissions:
- android.permission.RECORD_AUDIO (protection level: dangerous)
The global input mute applies to all input streams, including microphones, Virtual Capture and Mixed Capture. Any app with capture privileges can set it, and it will apply for all apps.
API Level:
- 20
MLAudioSetMicMuteCallback
MLResult MLAudioSetMicMuteCallback(
MLAudioMicMuteCallback callback,
void * context
)
Registers a callback for changes to the global input mute state.
Parameters
MLAudioMicMuteCallback | callback | Callback function pointer. |
void * | context | Generic data pointer passed back through the callback. |
Returns
MLResult | MLResult_AllocFailed | Failed due to memory allocation failure. |
MLResult | MLResult_Ok | Successfully registered the callback. |
MLResult | MLResult_PermissionDenied | Failed due to lack of permission. |
MLResult | MLResult_UnspecifiedFailure | Failed due to an unknown error. |
MLResult | MLAudioResult_NotImplemented | Failed because feature has not been implemented yet. |
Required Permissions:
- android.permission.RECORD_AUDIO (protection level: dangerous)