AudioVolume
Description:
Provides volume-related APIs for audio rendering or capturing, including functions to set the mute operation, volume, and gain.
Since:
1.0
Version:
1.0
Summary
Data Fields
Details
GetGain
Description:
Obtains the audio gain.
handle | Indicates the audio handle. |
gain | Indicates the pointer to the audio gain. |
Returns:
Returns 0 if the audio gain is obtained; returns a negative value otherwise.
See also:
GetGainThreshold
Description:
Obtains the range of the audio gain.
The audio gain can be expressed in one of the following two ways (depending on the chip platform), corresponding to two types of value ranges:
Parameters:
Returns:
Returns 0 if the range is obtained; returns a negative value otherwise.
See also:
GetMute
Description:
Obtains the mute operation set for the audio.
Parameters:
handle | Indicates the audio handle. |
mute | Indicates the pointer to the mute operation set for the audio. Value true means that the audio is muted, and false means the opposite. |
Returns:
Returns 0 if the mute operation is obtained; returns a negative value otherwise.
See also:
Description:
Obtains the audio volume.
Parameters:
Returns:
Returns 0 if the volume is obtained; returns a negative value otherwise.
See also:
SetGain
Description:
Sets the audio gain.
Parameters:
handle | Indicates the audio handle. |
gain | Indicates the audio gain to set. |
Returns:
Returns 0 if the setting is successful; returns a negative value otherwise.
See also:
SetMute
Description:
Sets the mute operation for the audio.
Parameters:
Returns:
Returns 0 if the setting is successful; returns a negative value otherwise.
See also:
SetVolume
Description:
Sets the audio volume.
The volume ranges from 0.0 to 1.0. If the volume level in an audio service ranges from 0 to 15, 0.0 indicates that the audio is muted, and 1.0 indicates the maximum volume level (15).
Parameters:
handle | Indicates the audio handle. |
volume | Indicates the volume to set. The value ranges from 0.0 to 1.0. |
Returns:
Returns 0 if the setting is successful; returns a negative value otherwise.