Replace volume control api 66/54166/1 accepted/tizen/tv/20151214.060012 submit/tizen/20151214.015809
authorjinwoo.shin <jw0227.shin@samsung.com>
Mon, 14 Dec 2015 01:44:14 +0000 (10:44 +0900)
committerjinwoo.shin <jw0227.shin@samsung.com>
Mon, 14 Dec 2015 01:44:14 +0000 (10:44 +0900)
Change-Id: I7a7c0ab2f4ce1a1bdda67ce94e97702511cf407e
Signed-off-by: jinwoo.shin <jw0227.shin@samsung.com>
src/volume.c

index 9109dc8..c2551ce 100644 (file)
@@ -16,6 +16,7 @@
 
 #include <app_debug.h>
 #include <sound_manager.h>
+#include <sound_manager_internal.h>
 
 #include "define.h"
 #include "volume.h"
@@ -41,9 +42,9 @@ int volume_set_mute(bool is_mute)
        mute = is_mute;
 
        if (mute)
-               sound_manager_set_volume(SOUND_TYPE_MEDIA, MUTE_VALUE);
+               sound_manager_set_master_volume(MUTE_VALUE);
        else
-               sound_manager_set_volume(SOUND_TYPE_MEDIA, volume);
+               sound_manager_set_master_volume(volume);
 
        return 0;
 }
@@ -63,7 +64,7 @@ int volume_set_volume(int vol)
                return -1;
        }
 
-       r = sound_manager_set_volume(SOUND_TYPE_MEDIA, vol);
+       r = sound_manager_set_master_volume(vol);
        if (r < 0) {
                _ERR("failed to set volume");
                return -1;
@@ -81,7 +82,7 @@ int volume_get_volume(void)
        if (volume_is_mute())
                return volume;
 
-       r = sound_manager_get_volume(SOUND_TYPE_MEDIA, &vol);
+       r = sound_manager_get_master_volume(&vol);
        if (r < 0)
                return -1;