sound-manager API changed. 03/100803/2
authoraravind.gara <aravind.gara@samsung.com>
Tue, 29 Nov 2016 08:38:18 +0000 (17:38 +0900)
committerSeungbae Shin <seungbae.shin@samsung.com>
Fri, 2 Dec 2016 04:28:25 +0000 (13:28 +0900)
Change-Id: I074b9459d75036e7aa3841c90c1e26d0c920875c
Signed-off-by: aravind.gara <aravind.gara@samsung.com>
src/SttManager.cpp

index d8c53b5..3632923 100755 (executable)
@@ -50,7 +50,8 @@ static inline const char *stt_state_str(stt_state_e cur) {
                return (const char *) "ABNORMAL CASE";
 }
 
-static void player_focus_state_cb(sound_stream_info_h stream_info, sound_stream_focus_change_reason_e reason_for_change, const char *extra_info, void *user_data)
+static void player_focus_state_cb(sound_stream_info_h stream_info, sound_stream_focus_mask_e focus_mask, sound_stream_focus_state_e focus_state,
+                                  sound_stream_focus_change_reason_e reason_for_change, int sound_behavior, const char *extra_info, void *user_data)
 {
 }
 
@@ -140,7 +141,7 @@ void SttManager::Start() {
        asrtype = STT_RECOGNITION_TYPE_FREE_PARTIAL;
        int ret;
 
-       ret = sound_manager_acquire_focus(g_stream_info_h, (sound_stream_focus_mask_e)(SOUND_STREAM_FOCUS_FOR_PLAYBACK | SOUND_STREAM_FOCUS_FOR_RECORDING), NULL);
+       ret = sound_manager_acquire_focus(g_stream_info_h, (sound_stream_focus_mask_e)(SOUND_STREAM_FOCUS_FOR_PLAYBACK | SOUND_STREAM_FOCUS_FOR_RECORDING), SOUND_BEHAVIOR_NONE, NULL);
        if (SOUND_MANAGER_ERROR_NONE != ret) {
                LOGW("Fail to acquire playback or recording focus. ret : %d, stream handle : %p", ret, g_stream_info_h);
        }
@@ -554,7 +555,7 @@ void SttManager::EnableSilenceDetection(bool enabled) {
 
 void SttManager::ReleaseSoundFocus()
 {
-       int ret = sound_manager_release_focus(g_stream_info_h, (sound_stream_focus_mask_e)(SOUND_STREAM_FOCUS_FOR_PLAYBACK | SOUND_STREAM_FOCUS_FOR_RECORDING), NULL);
+       int ret = sound_manager_release_focus(g_stream_info_h, (sound_stream_focus_mask_e)(SOUND_STREAM_FOCUS_FOR_PLAYBACK | SOUND_STREAM_FOCUS_FOR_RECORDING), SOUND_BEHAVIOR_NONE, NULL);
        if (SOUND_MANAGER_ERROR_NONE != ret) {
                LOGW("Fail to release playback or recording focus. ret : %d", ret);
        }