sound-manager API changed 12/99312/4
authoraravind.gara <aravind.gara@samsung.com>
Tue, 22 Nov 2016 10:25:42 +0000 (19:25 +0900)
committeraravind kumar <aravind.gara@samsung.com>
Thu, 1 Dec 2016 06:20:16 +0000 (22:20 -0800)
Change-Id: I5089608a35155f3cafb812274cf771d4c8a86fbe
Signed-off-by: aravind.gara <aravind.gara@samsung.com>
src/SttManager.cpp

index 46b384e..02d6279 100644 (file)
@@ -48,7 +48,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)
 {
 }
 
@@ -138,7 +139,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);
     }
@@ -533,7 +534,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);
     }