Interface IAudioManager2
interface IAudioManager2
Extends IAudioManager
Methods
enableAvrcpAbsoluteVolume()
Enable AVRCP absolute volume. When absolute volume is ON, A2DP output will not have volume attenuation from this system.voidenableAvrcpAbsoluteVolume(stringbtAddress)
Parameters
btAddress
string — Required
unique character string to identify the BT device
Needs privilege “com.amazon.audio.privilege.settings.control”
disableAvrcpAbsoluteVolume()
Disable AVRCP absolute volume. When absolute volume is OFF, A2DP output will get volume attenuation applied from this system.voiddisableAvrcpAbsoluteVolume(stringbtAddress)
Parameters
btAddress
string — Required
unique character string to identify the BT device
Needs privilege “com.amazon.audio.privilege.settings.control”
isAvrcpAbsoluteVolumeEnabled()
Check if AVRCP absolute volume is enabled or not.boolisAvrcpAbsoluteVolumeEnabled(stringbtAddress)
Parameters
btAddress
string — Required
unique character string to identify the BT device
Returns
bool
true if AVRCP absolute volume state is enabled, false otherwise
enableUsage()
Set usage enable. Audio with specified usage can be played. Now only notification is supported. When setting other usages, the function will throw a “[com.amazon.apmf.SecurityError]: No Permission” exception.voidenableUsage(AudioUsage*usage)
Parameters
usage
AudioUsage* — Required
usage type
Needs privilege “com.amazon.audio.privilege.settings.control”
disableUsage()
Set usage disable. Audio with specified usage cannot be played. Now only notification is supported. When setting other usages, the function will throw a “[com.amazon.apmf.SecurityError]: No Permission” exception.voiddisableUsage(AudioUsage*usage)
Parameters
usage
AudioUsage* — Required
usage type
Needs privilege “com.amazon.audio.privilege.settings.control”
isUsageEnabled()
Check if specified usage audio can be played or not.boolisUsageEnabled(AudioUsage*usage)
Parameters
usage
AudioUsage* — Required
usage type
Returns
bool
true if usage is enabled, false otherwise
getSupportedRecordConfigurations()
Query audio pipeline for a list of supported audio configurations for record.AudioConfig[]getSupportedRecordConfigurations(boolexcludeDisconnectedDevice,AudioSource*sourceType)
Parameters
excludeDisconnectedDevice
bool — Required
returns the configuration for connected devices or supported devices.
True means that it returns the configuration for connected devices.
False means that it returns the configuration for all supported devices in the configuration files.
sourceType
AudioSource* — Required
audio source to query
Returns
AudioConfig[]
list of audio record configuraions for the specified audio source.
allocateCustomAudioEffectSession()
u32 allocateCustomAudioEffectSession()
Create unique custom audio session ID for audio effect and audio data client.
This ID will be used to associate custom audio effects and audio data clients that
will have those effects to be applied on.
Returns
u32
an unique custom audio effect session ID

