From: Priya Kohli Date: Tue, 17 Sep 2019 09:55:12 +0000 (+0530) Subject: [TBT][Volume][TFDF-5014, volume not changed based on slider] X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cd5e34beca7aea8859ebd9935990ce0c53e5f2ae;p=test%2Ftct%2Fnative%2Fbehavior.git [TBT][Volume][TFDF-5014, volume not changed based on slider] Change-Id: If47c7c0b84bc1187e41078cae396f782d85c0771 Signed-off-by: Priya Kohli --- diff --git a/release/binary-armv7l/org.tizen.tbtcoreapp-1.0.0-arm.tpk b/release/binary-armv7l/org.tizen.tbtcoreapp-1.0.0-arm.tpk index d82fdf6..f070d19 100755 Binary files a/release/binary-armv7l/org.tizen.tbtcoreapp-1.0.0-arm.tpk and b/release/binary-armv7l/org.tizen.tbtcoreapp-1.0.0-arm.tpk differ diff --git a/release/binary-x86/org.tizen.tbtcoreapp-1.0.0-x86.tpk b/release/binary-x86/org.tizen.tbtcoreapp-1.0.0-x86.tpk index 039a995..c9896ff 100755 Binary files a/release/binary-x86/org.tizen.tbtcoreapp-1.0.0-x86.tpk and b/release/binary-x86/org.tizen.tbtcoreapp-1.0.0-x86.tpk differ diff --git a/tbtcoreapp/src/view/tbt-sound-view.c b/tbtcoreapp/src/view/tbt-sound-view.c index 9e56c32..d6eb873 100644 --- a/tbtcoreapp/src/view/tbt-sound-view.c +++ b/tbtcoreapp/src/view/tbt-sound-view.c @@ -456,12 +456,21 @@ static player_h create_player(sound_view *this) player_h player = NULL; int ret ; + float left = 1.0; + float right = 1.0; ret = player_create(&player); RETVM_IF(ret != PLAYER_ERROR_NONE, NULL, "player_create fail > Error = %s", get_player_error(ret)); RETVM_IF(player == NULL, NULL, "player_create fail"); - ret = player_set_volume(player, 1.0, 1.0); + if(this->view->tbt_info->apptype == TBT_APP_SOUND_VOLUME) + { + left = 0.0; + right = 0.0; + } + + ret = player_set_volume(player, left, right); + if(ret != PLAYER_ERROR_NONE) { DBG( "player_set_volume fail > Error = %s", get_player_error(ret)); @@ -626,6 +635,12 @@ static void _slider_drag_stop_cb(void *data, Evas_Object *obj, void *event_info) RETM_IF(NULL == view, "view is NULL"); double val = elm_slider_value_get(obj); + + double min = 100.0; + double max = 0.0; + elm_slider_min_max_get(obj, &min, &max); + + val = val/(max-min); player_set_volume(view->player, val, val); } @@ -647,6 +662,12 @@ static void _slider_changed_cb(void *data, Evas_Object *obj, void *event_info) RETM_IF(NULL == view, "view is NULL"); double val = elm_slider_value_get(obj); + + double min = 100.0; + double max = 0.0; + elm_slider_min_max_get(obj, &min, &max); + val = val/(max-min); + ret = player_set_volume(view->player, val, val); RETM_IF(ret != PLAYER_ERROR_NONE, "player_set_volume fail > Error = %s", get_player_error(ret)); }