The Volume API provides functions to check and control volumes.
Required Header
#include <sound_manager.h>
Overview
The Sound Manager Volume API allows you to:
- check/control output volumes
- handle a volume changed notification
The Sound Manager has predefined types of sounds.(system, notification, alarm, ringtone, media, call, voip, voice).
Current volume level of each type can be checked with sound_manager_get_volume(). To get the maximum supported volume level of each type, call sound_manager_get_max_volume(). The volume level of each type can be adjusted with sound_manager_set_volume().
The type of currently playing sound may be obtained by calling sound_manager_get_current_sound_type().
Typedef Documentation
Enumeration Type Documentation
Enumeration for sound type.
- Since :
- 2.3
- Enumerator:
| SOUND_TYPE_SYSTEM |
Sound type for system
|
| SOUND_TYPE_NOTIFICATION |
Sound type for notifications
|
| SOUND_TYPE_ALARM |
Sound type for alarm
|
| SOUND_TYPE_RINGTONE |
Sound type for ringtones (Since 2.4)
|
| SOUND_TYPE_MEDIA |
Sound type for media
|
| SOUND_TYPE_CALL |
Sound type for call (Since 2.4)
|
| SOUND_TYPE_VOIP |
Sound type for voip (Since 2.4)
|
| SOUND_TYPE_VOICE |
Sound type for voice
|
Function Documentation
Gets the type of the sound being currently played.
- Since :
- 2.3
- Parameters:
-
| [out] | type | The current sound type |
- Returns:
0 on success, otherwise a negative error value
- Return values:
-
Gets the maximum volume level supported for a particular sound type.
- Since :
- 2.3
- Parameters:
-
| [in] | type | The sound type |
| [out] | max | The maximum volume level |
- Returns:
0 on success, otherwise a negative error value
- Return values:
-
- See also:
- sound_manager_set_volume()
-
sound_manager_get_volume()
Removes the volume change callback.
- Since :
- 3.0
- Parameters:
-
| [in] | id | The id of the callback to remove |
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
- See also:
- sound_manager_add_volume_changed_cb()
Sets the volume level specified for a particular sound type.
- Since :
- 2.3
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/volume.set
- Parameters:
-
| [in] | type | The sound type |
| [in] | volume | The volume level to be set |
- Returns:
0 on success, otherwise a negative error value
- Return values:
-
- See also:
- sound_manager_get_max_volume()
-
sound_manager_get_volume()