Remove unnecessary log in ducking state changed callback 88/249588/1 accepted/tizen/unified/20201216.215926 submit/tizen/20201216.021959
authorJeongmo Yang <jm80.yang@samsung.com>
Tue, 15 Dec 2020 07:32:58 +0000 (16:32 +0900)
committerJeongmo Yang <jm80.yang@samsung.com>
Tue, 15 Dec 2020 07:38:58 +0000 (16:38 +0900)
[Version] 0.6.31
[Issue Type] Revise

Change-Id: Icb5d8de5de1bf8ece0f756401a22017772e050e4
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
packaging/capi-media-sound-manager.spec
src/sound_manager.c

index eeba2a7..ff64508 100644 (file)
@@ -1,6 +1,6 @@
 Name:       capi-media-sound-manager
 Summary:    Sound Manager library
-Version:    0.6.30
+Version:    0.6.31
 Release:    0
 Group:      Multimedia/API
 License:    Apache-2.0
index a6aef71..6f7ab9b 100644 (file)
@@ -31,19 +31,14 @@ static void _ducking_state_changed_cb(int pa_index, bool is_ducked, void *user_d
        SM_ENTER_CRITICAL_SECTION(&ducking_mutex);
 
        for (i = 0 ; i < SOUND_DUCKING_ARR_MAX ; i++) {
-               if (ducking_arr[i] && ducking_arr[i]->pa_info.index == pa_index)
+               if (ducking_arr[i] && ducking_arr[i]->pa_info.index == pa_index) {
+                       LOGI("ducking state changed [i:%d,ducked:%u]", pa_index, is_ducked);
+                       if (ducking_arr[i]->user_cb)
+                               ducking_arr[i]->user_cb((sound_stream_ducking_h)ducking_arr[i], is_ducked, ducking_arr[i]->user_data);
+                       else
+                               LOGW("no user callback for pa_index %d", pa_index);
                        break;
-       }
-
-       if (i < SOUND_DUCKING_ARR_MAX) {
-               LOGI("ducking state changed [i:%d,ducked:%u]", pa_index, is_ducked);
-
-               if (ducking_arr[i]->user_cb)
-                       ducking_arr[i]->user_cb((sound_stream_ducking_h)ducking_arr[i], is_ducked, ducking_arr[i]->user_data);
-               else
-                       LOGW("no user callback for pa_index %d", pa_index);
-       } else {
-               LOGE("could not found for pa_index %d", pa_index);
+               }
        }
 
        SM_LEAVE_CRITICAL_SECTION(&ducking_mutex);