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);
}