audio-io fixed for session related focus interface 73/48273/3 accepted/tizen/common/20160108.084014 accepted/tizen/mobile/20150918.024634 accepted/tizen/tv/20150918.024652 accepted/tizen/wearable/20150918.024706 submit/tizen/20150917.021316 submit/tizen/20150917.064134 submit/tizen_common/20160104.190333
authorKimJeongYeon <jeongyeon.kim@samsung.com>
Thu, 17 Sep 2015 04:29:51 +0000 (13:29 +0900)
committerKimJeongYeon <jeongyeon.kim@samsung.com>
Thu, 17 Sep 2015 04:33:11 +0000 (13:33 +0900)
[Version] 0.3.18
[Profile] Common
[Issue Type] API
[Dependency module] NA
[Dependency commit] NA
[Comment]

Signed-off-by: KimJeongYeon <jeongyeon.kim@samsung.com>
Change-Id: Ie36f5a8a4a6de6af014e0ecb93f0d2795c1ee0dc

packaging/capi-media-audio-io.spec
src/cpp/CAudioSessionHandler.cpp

index fa1c419..ec47426 100644 (file)
@@ -1,6 +1,6 @@
 Name:           capi-media-audio-io
 Summary:        An Audio Input & Audio Output library in Tizen Native API
-Version:        0.3.17
+Version:        0.3.18
 Release:        0
 Group:          Multimedia/API
 License:        Apache-2.0
index 73aa20a..4ab4060 100644 (file)
@@ -15,6 +15,7 @@
  */
 
 
+#include <unistd.h>
 #include <mm_error.h>
 #include "CAudioIODef.h"
 
@@ -369,6 +370,7 @@ void CAudioSessionHandler::registerSound() throw (CAudioError) {
 
             // Register focus callback
             errorCode = mm_sound_register_focus_for_session(__mId,
+                                                getpid(),
                                                 __mAudioSession == EAudioSessionType::AUDIO_SESSION_TYPE_CAPTURE ? __STREAM_TYPE_TABLE_IN[index].name : __STREAM_TYPE_TABLE_OUT[index].name,
                                                 __sound_pcm_focus_cb,
                                                 static_cast<void*>(this));
@@ -381,9 +383,9 @@ void CAudioSessionHandler::registerSound() throw (CAudioError) {
             AUDIO_IO_LOGD("Focus callback registered successfully [id:%d]", __mId);
         } else if (!(__mOptions & MM_SESSION_OPTION_UNINTERRUPTIBLE)) {
             // Register focus watch callback
-            errorCode = mm_sound_set_focus_watch_callback(FOCUS_FOR_BOTH, __sound_pcm_focus_watch_cb, static_cast<void*>(this), &__mId);
+            errorCode = mm_sound_set_focus_watch_callback_for_session(getpid(), FOCUS_FOR_BOTH, __sound_pcm_focus_watch_cb, static_cast<void*>(this), &__mId);
             if (errorCode < 0) {
-                THROW_ERROR_MSG_FORMAT(CAudioError::EError::ERROR_POLICY_BLOCKED, "Failed mm_sound_set_focus_watch_callback() err:0x%x", errorCode);
+                THROW_ERROR_MSG_FORMAT(CAudioError::EError::ERROR_POLICY_BLOCKED, "Failed mm_sound_set_focus_watch_callback_for_session() err:0x%x", errorCode);
             }
 
             __focusIdCountInc();