summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraravind.gara <aravind.gara@samsung.com>2016-11-22 19:13:10 +0900
committerKyeonghun Lee <kh9090.lee@samsung.com>2016-12-01 20:06:16 -0800
commit2a4ea662387c4c3174fe21755c5893debbec7c7d (patch)
tree7f2099fcde24b21815ed427c5d2b14093267c68a
parent10092c562b23c5144cf225f409f3305454aaa696 (diff)
downloadmsg-service-2a4ea662387c4c3174fe21755c5893debbec7c7d.tar.gz
msg-service-2a4ea662387c4c3174fe21755c5893debbec7c7d.tar.bz2
msg-service-2a4ea662387c4c3174fe21755c5893debbec7c7d.zip
sound-manager API changed
Change-Id: Icc429491b49e1d680e25eaf564b55716a12d7469 Signed-off-by: aravind.gara <aravind.gara@samsung.com>
-rw-r--r--manager/src/msg-manager-sound.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/manager/src/msg-manager-sound.cpp b/manager/src/msg-manager-sound.cpp
index 9831e66..16ce016 100644
--- a/manager/src/msg-manager-sound.cpp
+++ b/manager/src/msg-manager-sound.cpp
@@ -105,14 +105,12 @@ static void MsgMgrSoundPlayeInterruptedCallback(player_interrupted_code_e code,
MsgMgrSoundPlayStop();
}
-static void MsgStreamFocusCallback(sound_stream_info_h stream_info, sound_stream_focus_change_reason_e reason_for_change, const char *additional_info, void *user_data)
+static void MsgStreamFocusCallback(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 *additional_info, void *user_data)
{
MSG_MGR_DEBUG("MsgStreamFocusCallback called, reason_for_change [%d], additional_info [%s]", reason_for_change, additional_info);
- sound_stream_focus_state_e playback_focus_state = SOUND_STREAM_FOCUS_STATE_ACQUIRED;
-
- sound_manager_get_focus_state(stream_info, &playback_focus_state, NULL);
- if (playback_focus_state == SOUND_STREAM_FOCUS_STATE_RELEASED) {
+ if ((focus_mask == SOUND_STREAM_FOCUS_FOR_PLAYBACK) && (focus_state == SOUND_STREAM_FOCUS_STATE_RELEASED)) {
MSG_MGR_DEBUG("sound stream focus released");
MsgMgrSoundPlayStop();
}
@@ -465,7 +463,7 @@ int MsgMgrStreamStart(MSG_MGR_SOUND_TYPE_T soundType)
return err;
}
- err = sound_manager_acquire_focus(g_stream_info, SOUND_STREAM_FOCUS_FOR_PLAYBACK, NULL);
+ err = sound_manager_acquire_focus(g_stream_info, SOUND_STREAM_FOCUS_FOR_PLAYBACK, SOUND_BEHAVIOR_NONE, NULL);
pthread_mutex_unlock(&muStream);
MSG_MGR_END();
@@ -479,7 +477,7 @@ void MsgMgrStreamStop()
pthread_mutex_lock(&muStream);
if (g_stream_info != NULL) {
- int err = sound_manager_release_focus(g_stream_info, SOUND_STREAM_FOCUS_FOR_PLAYBACK, NULL);
+ int err = sound_manager_release_focus(g_stream_info, SOUND_STREAM_FOCUS_FOR_PLAYBACK, SOUND_BEHAVIOR_NONE, NULL);
if (err != SOUND_MANAGER_ERROR_NONE)
MSG_MGR_DEBUG("sound_manager_release_focus() Failed : %d", err);