The Session API provides functions to control a session. (Deprecated)
Required Header
#include <sound_manager.h>
Overview
The Sound Manager Session API allows you to:
- determine a sound session policy
- handle the notification of a sound session interruption
The Sound Manager has predefined sound sessions (media, alarm, notification, emergency, voip)
Related Features
APIs for voip sound session and voip stream type are related with the following features:
It is recommended to design feature related codes in your application for reliability.
You can check if a device supports the related features for this API by using System Information, thereby controlling the procedure of your application.
To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.
More details on featuring your application can be found from Feature Element.
Typedef Documentation
Enumeration Type Documentation
Enumeration for sound session interrupted type.
- Deprecated:
- Deprecated since 3.0. Use sound_stream_focus_state_changed_cb instead.
- Since :
- 2.3
- Enumerator:
SOUND_SESSION_INTERRUPTED_COMPLETED |
Interrupt completed
|
SOUND_SESSION_INTERRUPTED_BY_MEDIA |
Interrupted by media application
|
SOUND_SESSION_INTERRUPTED_BY_CALL |
Interrupted by an incoming call
|
SOUND_SESSION_INTERRUPTED_BY_EARJACK_UNPLUG |
Interrupted by unplugging headphones
|
SOUND_SESSION_INTERRUPTED_BY_RESOURCE_CONFLICT |
Interrupted by a resource conflict
|
SOUND_SESSION_INTERRUPTED_BY_ALARM |
Interrupted by an alarm
|
SOUND_SESSION_INTERRUPTED_BY_EMERGENCY |
Interrupted by an emergency
|
SOUND_SESSION_INTERRUPTED_BY_NOTIFICATION |
Interrupted by a notification
|
Enumeration for session option during play.
- Deprecated:
- Deprecated since 3.0. In sound_stream_focus_state_changed_cb, you can choose to stop playing or not.
- Since :
- 2.3
- Enumerator:
SOUND_SESSION_OPTION_INTERRUPTIBLE_DURING_PLAY |
This session will be interrupted by other sessions during play (default)
|
SOUND_SESSION_OPTION_UNINTERRUPTIBLE_DURING_PLAY |
This session will not be interrupted by other media sessions
|
Enumeration for session option for resumption.
- Deprecated:
- Deprecated since 3.0. In sound_stream_focus_state_changed_cb, you can choose to resume playing or not.
- Since :
- 2.3
- Enumerator:
SOUND_SESSION_OPTION_RESUMPTION_BY_SYSTEM |
This session will be resumed according to system policy (default)
|
SOUND_SESSION_OPTION_RESUMPTION_BY_SYSTEM_OR_MEDIA_PAUSED |
This session will be resumed according to system policy and when the media session which interrupted this session is paused
|
Enumeration for session option for starting.
- Deprecated:
- Deprecated since 3.0. Use sound_manager_acquire_focus() or not instead.
- Since :
- 2.3
- Enumerator:
SOUND_SESSION_OPTION_MIX_WITH_OTHERS_WHEN_START |
This session will be mixed with others when starting (default)
|
SOUND_SESSION_OPTION_PAUSE_OTHERS_WHEN_START |
This session will interrupt other sessions when starting
|
Enumeration for session type.
- Deprecated:
- Deprecated since 3.0. Use sound_manager_create_stream_information() and sound_stream_type_e instead.
- Since :
- 2.3
- Enumerator:
SOUND_SESSION_TYPE_MEDIA |
Media type
|
SOUND_SESSION_TYPE_ALARM |
Alarm type
|
SOUND_SESSION_TYPE_NOTIFICATION |
Notification type
|
SOUND_SESSION_TYPE_EMERGENCY |
Emergency type
|
SOUND_SESSION_TYPE_VOIP |
VoIP type
|
Enumeration for voip session mode.
- Deprecated:
- Deprecated since 3.0. Use sound_manager_apply_stream_routing() instead.
- Since :
- 2.3
- Enumerator:
SOUND_SESSION_VOIP_MODE_RINGTONE |
voip mode for ringtone
|
SOUND_SESSION_VOIP_MODE_VOICE_WITH_BUILTIN_RECEIVER |
voip mode for during call with built-in receiver
|
SOUND_SESSION_VOIP_MODE_VOICE_WITH_BUILTIN_SPEAKER |
voip mode for during call with built-in speaker
|
SOUND_SESSION_VOIP_MODE_VOICE_WITH_AUDIO_JACK |
voip mode for during call with audio jack
|
SOUND_SESSION_VOIP_MODE_VOICE_WITH_BLUETOOTH |
voip mode for during call with bluetooth
|
Function Documentation
Unregisters the callback function which is called when the sound session being played is interrupted.
- Deprecated:
- Deprecated since 3.0.
- Since :
- 2.3
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
- See also:
- sound_manager_set_session_interrupted_cb()