Tizen(Headless) Native API  6.0
Sound Manager

The Sound Manager API provides functions to get and set sound parameters like volume, stream policy and devices.

Required Header

#include <sound_manager.h>

Overview

The Sound Manager service allows APIs to manage audio output.

The Sound Manager API allows you to:

  • check/control output volumes
  • handle a volume changed notification
  • determine/control a sound stream policy
  • handle the notification of a sound focus status change
  • query the basic information of connected sound devices
  • handle the notification for connection of a sound device

Asynchronous operations

The Sound Manager API allows only asynchronous operations.
Thus the result will be passed to the application via the callback mechanism. An appropriate callback can be called in response to changes initiated from outside the application.
Possible callbacks are listed below:

Callback(Event) Operations

The callback mechanism is used to notify the application about significant sound manager events.

REGISTER UNREGISTER CALLBACK DESCRIPTION
sound_manager_add_volume_changed_cb() sound_manager_remove_volume_changed_cb() sound_manager_volume_changed_cb() This callback is called when volume value is changed.
sound_manager_create_stream_information() sound_manager_destroy_stream_information() sound_stream_focus_state_changed_cb() This callback is called when the state of focus that belongs to the stream_info is changed.
sound_manager_add_focus_state_watch_cb() sound_manager_remove_focus_state_watch_cb() sound_stream_focus_state_watch_cb() This callback is called when the focus state for each sound stream type is changed regardless of the process.
sound_manager_add_device_connection_changed_cb() sound_manager_remove_device_connection_changed_cb() sound_device_connection_changed_cb() This callback is called when the connection of a sound device is changed.

Enumeration Type Documentation

Enumeration for sound manager's error codes.

Since :
2.3
Enumerator:
SOUND_MANAGER_ERROR_NONE 

Successful

SOUND_MANAGER_ERROR_OUT_OF_MEMORY 

Out of memory

SOUND_MANAGER_ERROR_INVALID_PARAMETER 

Invalid parameter

SOUND_MANAGER_ERROR_INVALID_OPERATION 

Invalid operation

SOUND_MANAGER_ERROR_PERMISSION_DENIED 

Permission denied

SOUND_MANAGER_ERROR_NOT_SUPPORTED 

Not supported

SOUND_MANAGER_ERROR_NO_DATA 

No data

SOUND_MANAGER_ERROR_INTERNAL 

Internal error inside the sound system

SOUND_MANAGER_ERROR_POLICY 

Noncompliance with the sound system policy

SOUND_MANAGER_ERROR_NO_PLAYING_SOUND 

No playing sound

SOUND_MANAGER_ERROR_INVALID_STATE 

Invalid state (Since 3.0)