Sound manager API changes 53/103753/5
authorKamil Lipiszko <k.lipiszko@samsung.com>
Fri, 9 Dec 2016 09:49:51 +0000 (10:49 +0100)
committerLukasz Stanislawski <l.stanislaws@samsung.com>
Wed, 14 Dec 2016 09:34:17 +0000 (01:34 -0800)
Clock app can not build due to changes made in sound manager api.
This patch fixes functions definitions that were changed.

Change-Id: I2a3e4af01c6e925c8a685552c10812f256fc6587

clock/inc/Utils/SoundManager.h
clock/src/Utils/SoundManager.cpp

index 3cb7a2d..b61f85d 100644 (file)
@@ -57,8 +57,10 @@ namespace utils {
                /**
                 * @brief Function to be called on sound stream focus change.
                 */
-               static void StreamFocusChangedCb(sound_stream_info_h streamInfo,
-                               sound_stream_focus_change_reason_e reason,
+               static void StreamFocusChangedCb(sound_stream_info_h stream_info,
+                               sound_stream_focus_mask_e focusMask,
+                               sound_stream_focus_state_e focusState,
+                               sound_stream_focus_change_reason_e reason, int sound_behavior,
                                const char *extraInfo, void *userData);
 
                /**
index 482f74b..5d28f2f 100644 (file)
@@ -36,7 +36,7 @@ bool SoundManager::SoundPlay(const std::string &uri, double volume)
                return false;
        }
 
-       ret = sound_manager_acquire_focus(stream_info_, SOUND_STREAM_FOCUS_FOR_PLAYBACK, NULL);
+       ret = sound_manager_acquire_focus(stream_info_, SOUND_STREAM_FOCUS_FOR_PLAYBACK, SOUND_BEHAVIOR_NONE, NULL);
        if (ret != SOUND_MANAGER_ERROR_NONE) {
                PlayerRelease();
                ERR("sound_manager_acquire_focus failed[%d]: %s", ret, get_error_message(ret));
@@ -125,8 +125,9 @@ void SoundManager::PlayerRelease()
        }
 }
 
-void SoundManager::StreamFocusChangedCb(sound_stream_info_h streamInfo,
-               sound_stream_focus_change_reason_e reason, const char *extraInfo, void *userData)
+void SoundManager::StreamFocusChangedCb(sound_stream_info_h stream_info, sound_stream_focus_mask_e focusMask,
+               sound_stream_focus_state_e focusState, sound_stream_focus_change_reason_e reason, int sound_behavior,
+               const char *extraInfo, void *userData)
 {
        switch (GetStreamFocusState()) {
        case SOUND_STREAM_FOCUS_STATE_ACQUIRED:
@@ -198,7 +199,7 @@ bool SoundManager::SoundStop()
        }
 
        if (stream_info_) {
-               ret = sound_manager_release_focus(stream_info_, SOUND_STREAM_FOCUS_FOR_PLAYBACK, NULL);
+               ret = sound_manager_release_focus(stream_info_, SOUND_STREAM_FOCUS_FOR_PLAYBACK, SOUND_BEHAVIOR_NONE, NULL);
                if (ret != SOUND_MANAGER_ERROR_NONE)
                        ERR("sound_manager_release_focus failed[%d]: %s", ret, get_error_message(ret));
        }