CAudioIO: Update as per sound-manager echo-cancellation API change 28/273628/1 accepted/tizen/unified/20220418.141242 accepted/tizen/unified/20220420.135505 submit/tizen/20220415.044607 submit/tizen/20220419.020933
authorSangchul Lee <sc11.lee@samsung.com>
Mon, 11 Apr 2022 01:48:04 +0000 (10:48 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Mon, 11 Apr 2022 01:55:55 +0000 (10:55 +0900)
[Version] 0.5.47
[Issue Type] Update

Change-Id: I4a0deb2317633c49ada7c37dad93ec517ae3cf31
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
packaging/capi-media-audio-io.spec
src/cpp/CAudioIO.cpp

index 6ef26d7..14e93ed 100644 (file)
@@ -1,6 +1,6 @@
 Name:           capi-media-audio-io
 Summary:        An Audio Input & Audio Output library in Tizen Native API
-Version:        0.5.46
+Version:        0.5.47
 Release:        0
 Group:          Multimedia/API
 License:        Apache-2.0
index 093e7c2..0d7bc43 100644 (file)
@@ -225,18 +225,12 @@ void CAudioIO::setStreamInfo(sound_stream_info_h stream_info) {
     getAudioInfo().setAudioIndex(index);
 
     if (mDirection == CAudioInfo::EAudioDirection::AUDIO_DIRECTION_IN) {
-        sound_device_h device = NULL;
+        int device_id;
 
-        if ((errorCode = sound_manager_get_echo_cancel_reference_device(stream_info, &device) != SOUND_MANAGER_ERROR_NONE))
+        if ((errorCode = sound_manager_get_echo_cancel_reference_device(stream_info, &device_id) != SOUND_MANAGER_ERROR_NONE))
             THROW_ERROR_MSG_FORMAT(CAudioError::EError::ERROR_INVALID_ARGUMENT, "Can't get reference device [ret:%d]", errorCode); //LCOV_EXCL_LINE
 
-        if (device) {
-            int id;
-
-            if ((errorCode = sound_manager_get_device_id(device, &id) != SOUND_MANAGER_ERROR_NONE))
-                THROW_ERROR_MSG_FORMAT(CAudioError::EError::ERROR_INVALID_OPERATION, "Can't get device id [ret:%d]", errorCode); //LCOV_EXCL_LINE
-
-            getAudioInfo().bindEchoCancelReferenceDeviceId(id);
-        }
+        if (device_id != SOUND_MANAGER_STREAM_NO_REFERENCE_DEVICE)
+            getAudioInfo().bindEchoCancelReferenceDeviceId(device_id);
     }
 }