From: Sangchul Lee Date: Tue, 13 Feb 2018 00:15:37 +0000 (+0900) Subject: Remove deprecated behavior in sound_manager_get_current_sound_type() X-Git-Tag: submit/tizen/20180219.063156^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=64ec0b4e5fb44d4dc1a73026d0dc452e88e81dfe;p=platform%2Fcore%2Fapi%2Fsound-manager.git Remove deprecated behavior in sound_manager_get_current_sound_type() [Version] 0.5.1 [Issue Type] Clean-up Change-Id: I99da3cb1edda0dd2559f0ef899f6368a3471ed7d Signed-off-by: Sangchul Lee --- diff --git a/packaging/capi-media-sound-manager.spec b/packaging/capi-media-sound-manager.spec index f534dcb..258cfd5 100644 --- a/packaging/capi-media-sound-manager.spec +++ b/packaging/capi-media-sound-manager.spec @@ -1,6 +1,6 @@ Name: capi-media-sound-manager Summary: Sound Manager library -Version: 0.5.0 +Version: 0.5.1 Release: 0 Group: Multimedia/API License: Apache-2.0 diff --git a/src/sound_manager.c b/src/sound_manager.c index b0fe747..196333b 100644 --- a/src/sound_manager.c +++ b/src/sound_manager.c @@ -76,24 +76,17 @@ int sound_manager_get_volume(sound_type_e type, int *volume) int sound_manager_get_current_sound_type(sound_type_e *type) { int ret = MM_ERROR_NONE; - volume_type_t mm_sound_vol_type = VOLUME_TYPE_UNKNOWN; char *volume_type = NULL; if (type == NULL) return _convert_sound_manager_error_code(__func__, MM_ERROR_INVALID_ARGUMENT); - ret = mm_sound_volume_primary_type_get(&mm_sound_vol_type); + /* get the volume type of the current playing stream */ + ret = _get_current_volume_type(DIRECTION_OUT_STR, &volume_type); if (ret == MM_ERROR_NONE) { - if (mm_sound_vol_type == VOLUME_TYPE_UNKNOWN) { - /* get the volume type of the current playing stream */ - ret = _get_current_volume_type(DIRECTION_OUT_STR, &volume_type); - if (ret == MM_ERROR_NONE) - ret = _convert_sound_type_to_enum((const char*)volume_type, type); - } else { - *type = mm_sound_vol_type; - } + ret = _convert_sound_type_to_enum((const char*)volume_type, type); + LOGI("type=%d", *type); } - LOGI("type=%d", *type); return _convert_sound_manager_error_code(__func__, ret); }