Replace Deprecated sound_mm API 73/120273/1 accepted/tizen_common accepted/tizen_mobile accepted/tizen/common/20170322.154100 accepted/tizen/mobile/20170323.000850 accepted/tizen/unified/20170323.000907 submit/tizen/20170322.080840 submit/tizen/20170322.091920
authorjunkyu han <junkyu.han@samsung.com>
Wed, 22 Mar 2017 07:50:05 +0000 (16:50 +0900)
committerjunkyu han <junkyu.han@samsung.com>
Wed, 22 Mar 2017 07:50:05 +0000 (16:50 +0900)
Change-Id: Idc28812821e928d4d0a28acd0d793b5fcf8ecc91

src/sound.c

index 696c951..652da85 100755 (executable)
@@ -31,6 +31,7 @@ struct _sound_s_info {
        int sound_step;
        int sound_status;
        int vibration_status;
+       int sound_changed_callback_id;
        Eina_Bool is_vibration;
 };
 
@@ -38,6 +39,7 @@ static struct _sound_s_info sound_info = {
        .sound_step = 0,
        .sound_status = 0,
        .vibration_status = 0,
+       .sound_changed_callback_id = 1,
        .is_vibration = EINA_FALSE,
 };
 
@@ -190,7 +192,7 @@ void _mm_func(sound_type_e type, unsigned int volume, void *data)
 void volume_sound_mm_sound_init(void)
 {
        _D("MM sound Init");
-       int ret = sound_manager_set_volume_changed_cb(_mm_func, NULL);
+       int ret = sound_manager_add_volume_changed_cb(_mm_func, NULL, &sound_info.sound_changed_callback_id);
        if (ret != SOUND_MANAGER_ERROR_NONE)
                _E("Failed to set volume changed event[%d]", ret);
 }