From abc3800a7c1bbe30f71aba0aef215452f644d0a8 Mon Sep 17 00:00:00 2001 From: "aravind.gara" Date: Tue, 29 Nov 2016 17:38:18 +0900 Subject: [PATCH] sound-manager API changed. Change-Id: I074b9459d75036e7aa3841c90c1e26d0c920875c Signed-off-by: aravind.gara --- src/SttManager.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/SttManager.cpp b/src/SttManager.cpp index d8c53b5..3632923 100755 --- a/src/SttManager.cpp +++ b/src/SttManager.cpp @@ -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); } -- 2.7.4