Removed symbols that have been deprecated since 4.0 are as below.
- sound_device_state_e (SOUND_DEVICE_STATE_DEACTIVATED, SOUND_DEVICE_STATE_ACTIVATED)
- SOUND_DEVICE_STATE_DEACTIVATED_MASK
- SOUND_DEVICE_STATE_ACTIVATED_MASK
- sound_manager_get_device_state()
- sound_manager_add_device_state_changed_cb()
- sound_manager_remove_device_state_changed_cb()
[Version] 0.7.0
[Issue Type] API removal
Change-Id: I53d067b6ce391f7a46e6940c2c019fe5b3775ca0
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
} sound_device_io_direction_e;
-/**
-* @deprecated Deprecated since 4.0.
-* @brief Enumeration for sound device state.
-* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
-*/
-typedef enum {
- SOUND_DEVICE_STATE_DEACTIVATED, /**< Deactivated state */
- SOUND_DEVICE_STATE_ACTIVATED, /**< Activated state */
-} sound_device_state_e;
-
/**
* @brief Enumeration for sound device mask.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
SOUND_DEVICE_IO_DIRECTION_BOTH_MASK = 0x0004, /**< Mask for input/output devices (both directions are available) */
SOUND_DEVICE_TYPE_INTERNAL_MASK = 0x0010, /**< Mask for built-in devices */
SOUND_DEVICE_TYPE_EXTERNAL_MASK = 0x0020, /**< Mask for external devices */
- SOUND_DEVICE_STATE_DEACTIVATED_MASK = 0x1000, /**< Mask for deactivated devices (Deprecated since 4.0) */
- SOUND_DEVICE_STATE_ACTIVATED_MASK = 0x2000, /**< Mask for activated devices (Deprecated since 4.0) */
SOUND_DEVICE_ALL_MASK = 0xFFFF, /**< Mask for all devices */
} sound_device_mask_e;
*/
typedef void (*sound_device_running_changed_cb) (sound_device_h device, bool is_running, void *user_data);
-/**
- * @deprecated Deprecated since 4.0. Use sound_device_running_changed_cb() instead.
- * @brief Called when the state of a sound device was changed.
- * @since_tizen 3.0
- *
- * @remarks @a device is freed by the platform after this callback exits.
- *
- * @param[in] device The sound_device
- * @param[in] state The state of the device
- * @param[in] user_data The user data passed from the callback registration function
- * @pre You should add this callback using sound_manager_add_device_state_changed_cb().
- * @see sound_manager_add_device_state_changed_cb()
- * @see sound_manager_remove_device_state_changed_cb()
- */
-typedef void (*sound_device_state_changed_cb) (sound_device_h device, sound_device_state_e state, void *user_data);
-
/**
* @}
*/
*/
int sound_manager_is_device_running(sound_device_h device, bool *is_running);
-/**
- * @deprecated Deprecated since 4.0. Use sound_manager_is_device_running() instead.
- * @brief Gets the state of the device.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @param[in] device The device item
- * @param[out] state The state of the device
- * @return @c 0 on success,
- * otherwise a negative error value
- * @retval #SOUND_MANAGER_ERROR_NONE Success
- * @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
- * @see sound_manager_get_device_list()
- * @see sound_manager_get_next_device()
- * @see sound_manager_get_prev_device()
- * @see sound_manager_get_device_type()
- * @see sound_manager_get_device_io_direction()
- * @see sound_manager_get_device_id()
- * @see sound_manager_get_device_name()
- * @see sound_manager_free_device_list()
- */
-int sound_manager_get_device_state(sound_device_h device, sound_device_state_e *state) TIZEN_DEPRECATED_API;
-
/**
* @brief Gets the device's supported sample formats.
* @since_tizen 5.0
*/
int sound_manager_remove_device_running_changed_cb(int id);
-/**
- * @deprecated Deprecated since 4.0. Use sound_manager_add_device_running_changed_cb() instead.
- * @brief Adds a callback function to be invoked when the state of a sound device was changed.
- * @since_tizen 3.0
- *
- * @param[in] device_mask Devices for which changes should be tracked, values of #sound_device_mask_e combined with bitwise 'or'
- * @param[in] callback The device state changed callback function
- * @param[in] user_data The user data to be passed to the callback function
- * @param[out] id The callback id
- * @return @c 0 on success,
- * otherwise a negative error value
- * @retval #SOUND_MANAGER_ERROR_NONE Success
- * @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system
- * @post sound_device_state_changed_cb() will be invoked.
- * @see sound_manager_remove_device_state_changed_cb()
- * @see sound_device_state_changed_cb()
- */
-int sound_manager_add_device_state_changed_cb(int device_mask, sound_device_state_changed_cb callback, void *user_data, int *id) TIZEN_DEPRECATED_API;
-
-/**
- * @deprecated Deprecated since 4.0. Use sound_manager_remove_device_running_changed_cb() instead.
- * @brief Removes a callback function invoked when the state of a sound device was changed.
- * @since_tizen 3.0
- *
- * @param[in] id The id of the callback to remove
- * @return @c 0 on success,
- * otherwise a negative error value
- * @retval #SOUND_MANAGER_ERROR_NONE Success
- * @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system
- * @see sound_manager_add_device_state_changed_cb()
- */
-int sound_manager_remove_device_state_changed_cb(int id) TIZEN_DEPRECATED_API;
-
/**
* @}
*/
*/
int sound_manager_get_stream_preemptive_device(sound_stream_type_e stream_type, int *in_device_id, int *out_device_id);
-/**
- * @internal
- * @brief Gets the state of the device by id.
- * @since_tizen 4.0
- * @param[in] device_id The device id
- * @param[out] state The state of the device
- * @return @c 0 on success,
- * otherwise a negative error value
- * @retval #SOUND_MANAGER_ERROR_NONE Success
- * @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
- * @see sound_manager_get_device_list()
- * @see sound_manager_get_next_device()
- * @see sound_manager_get_prev_device()
- * @see sound_manager_get_device_id()
- * @see sound_manager_free_device_list()
- */
-int sound_manager_get_device_state_by_id(int device_id, sound_device_state_e *state);
-
/**
* @internal
* @brief Checks if the device is running.
* @see sound_manager_get_device_type()
* @see sound_manager_get_device_io_direction()
* @see sound_manager_get_device_name()
- * @see sound_manager_get_device_state()
* @see sound_manager_get_device_id()
* @see sound_manager_get_device_product_id()
* @see sound_manager_free_device_list()
* @see sound_manager_get_device_type()
* @see sound_manager_get_device_io_direction()
* @see sound_manager_get_device_name()
- * @see sound_manager_get_device_state()
* @see sound_manager_get_device_id()
* @see sound_manager_get_device_vendor_id()
* @see sound_manager_free_device_list()
*/
int sound_manager_get_stream_preemptive_device(sound_stream_type_e stream_type, int *in_device_id, int *out_device_id);
-/**
- * @internal
- * @brief Gets the state of the device by id.
- * @since_tizen 4.0
- * @param[in] device_id The device id
- * @param[out] state The state of the device
- * @return @c 0 on success,
- * otherwise a negative error value
- * @retval #SOUND_MANAGER_ERROR_NONE Success
- * @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
- * @see sound_manager_get_device_list()
- * @see sound_manager_get_next_device()
- * @see sound_manager_get_prev_device()
- * @see sound_manager_get_device_id()
- * @see sound_manager_free_device_list()
- */
-int sound_manager_get_device_state_by_id(int device_id, sound_device_state_e *state);
-
/**
* @internal
* @brief Checks if the device is running.
* @see sound_manager_get_device_type()
* @see sound_manager_get_device_io_direction()
* @see sound_manager_get_device_name()
- * @see sound_manager_get_device_state()
* @see sound_manager_get_device_id()
* @see sound_manager_get_device_product_id()
* @see sound_manager_free_device_list()
* @see sound_manager_get_device_type()
* @see sound_manager_get_device_io_direction()
* @see sound_manager_get_device_name()
- * @see sound_manager_get_device_state()
* @see sound_manager_get_device_id()
* @see sound_manager_get_device_vendor_id()
* @see sound_manager_free_device_list()
Name: capi-media-sound-manager
Summary: Sound Manager library
-Version: 0.6.51
+Version: 0.7.0
Release: 0
Group: Multimedia/API
License: Apache-2.0
return _convert_sound_manager_error_code(__func__, ret);
}
-int sound_manager_get_device_state(sound_device_h device, sound_device_state_e *state)
-{
- SM_ARG_CHECK(device);
- SM_ARG_CHECK(state);
-
- LOGW("DEPRECATION WARNING: %s() is deprecated and will be removed from next release.", __func__);
- *state = SOUND_DEVICE_STATE_DEACTIVATED;
-
- return SOUND_MANAGER_ERROR_NONE;
-}
-
int sound_manager_get_supported_sample_formats(sound_device_h device, sound_sample_format_e **formats, unsigned int *num_of_elems)
{
int ret = SOUND_MANAGER_ERROR_NONE;
return _convert_sound_manager_error_code(__func__, ret);
}
-int sound_manager_add_device_state_changed_cb(int device_mask, sound_device_state_changed_cb callback, void *user_data, int *id)
-{
- LOGW("DEPRECATION WARNING: %s() is deprecated and will be removed from next release.", __func__);
- SM_ARG_CHECK(callback);
- SM_ARG_CHECK(id);
-
- *id = -1;
-
- return SOUND_MANAGER_ERROR_NONE;
-}
-
-int sound_manager_remove_device_state_changed_cb(int id)
-{
- LOGW("DEPRECATION WARNING: %s() is deprecated and will be removed from next release.", __func__);
-
- return SOUND_MANAGER_ERROR_NONE;
-}
-
int sound_manager_create_stream_ducking(sound_stream_type_e target_stream, sound_stream_ducking_state_changed_cb callback, void *user_data, sound_stream_ducking_h *stream_ducking)
{
int i = 0;
return _set_preferred_device_id((sound_stream_info_s*)stream_info, io_direction, device_id);
}
-int sound_manager_get_device_state_by_id(int device_id, sound_device_state_e *state)
-{
- int ret = MM_ERROR_NONE;
- MMSoundDevice_t device = NULL;
-
- SM_ARG_CHECK(state);
-
- LOGI("device_id[%d]", device_id);
-
- if ((ret = mm_sound_get_device_by_id(device_id, &device)) != MM_ERROR_NONE) {
- LOGE("failed to mm_sound_get_device_by_id()");
- goto LEAVE;
- }
-
- ret = mm_sound_get_device_state(device, (mm_sound_device_state_e*)state);
-
- LOGI("state[%d]", *state);
-
- mm_sound_free_device(device);
-LEAVE:
- return _convert_sound_manager_error_code(__func__, ret);
-}
-
int sound_manager_is_device_running_by_id(int device_id, bool *is_running)
{
SM_ARG_CHECK(is_running);
CURRENT_STATUS_FREE_DEVICE_LIST,
CURRENT_STATUS_GET_DEVICE_NEXT,
CURRENT_STATUS_GET_DEVICE_PREV,
- CURRENT_STATUS_GET_DEVICE_STATE_BY_ID,
+ CURRENT_STATUS_IS_DEVICE_RUNNING_BY_ID,
CURRENT_STATUS_GET_SUPPORTED_SAMPLE_FORMATS,
CURRENT_STATUS_SET_SAMPLE_FORMAT,
CURRENT_STATUS_GET_SAMPLE_FORMAT,
int g_volume_cb_id;
int g_internal_volume_cb_id;
int g_device_conn_cb_id;
-int g_device_state_cb_id;
int g_device_running_cb_id;
static const char *g_device_direction_str[] = {"IN", "OUT", "BOTH"};
else if (strncmp(cmd, "gp", MAX_CMD_LEN) == 0)
g_menu_state = CURRENT_STATUS_GET_DEVICE_PREV;
else if (strncmp(cmd, "gd", MAX_CMD_LEN) == 0)
- g_menu_state = CURRENT_STATUS_GET_DEVICE_STATE_BY_ID;
+ g_menu_state = CURRENT_STATUS_IS_DEVICE_RUNNING_BY_ID;
else if (strncmp(cmd, "gssf", MAX_CMD_LEN) == 0)
g_menu_state = CURRENT_STATUS_GET_SUPPORTED_SAMPLE_FORMATS;
else if (strncmp(cmd, "ssf", MAX_CMD_LEN) == 0)
g_print("fl. Free Devices List\n");
g_print("gn. Get Next Device\t\t");
g_print("gp. Get Prev Device\n");
- g_print("gd. *Get Device State by Id\n");
+ g_print("gd. *Is Device Running by Id\n");
g_print("gssf. Get Supported Sample Formats\t");
g_print("gssr. Get Supported Sample Rates\n");
g_print("ssf. Set Sample Format\t");
g_print("*** press enter to get next device from the list\n");
else if (g_menu_state == CURRENT_STATUS_GET_DEVICE_PREV)
g_print("*** press enter to get previous device from the list\n");
- else if (g_menu_state == CURRENT_STATUS_GET_DEVICE_STATE_BY_ID)
- g_print("*** press enter device id to get state\n");
+ else if (g_menu_state == CURRENT_STATUS_IS_DEVICE_RUNNING_BY_ID)
+ g_print("*** press enter device id to check device running\n");
else if (g_menu_state == CURRENT_STATUS_GET_SUPPORTED_SAMPLE_FORMATS)
g_print("*** press enter to get supported sample formats\n");
else if (g_menu_state == CURRENT_STATUS_SET_SAMPLE_FORMAT)
reset_menu_state();
break;
}
- case CURRENT_STATUS_GET_DEVICE_STATE_BY_ID: {
+ case CURRENT_STATUS_IS_DEVICE_RUNNING_BY_ID: {
int ret = SOUND_MANAGER_ERROR_NONE;
int device_id;
bool is_running;
break;
}
case CURRENT_STATUS_REMOVE_DEVICE_RUNNING_CHANGED_CB: {
- if (sound_manager_remove_device_state_changed_cb(g_device_running_cb_id))
+ if (sound_manager_remove_device_running_changed_cb(g_device_running_cb_id))
g_print("fail to remove device running changed cb\n");
else
g_print("success to remove device running changed cb\n");