From: aravind.gara Date: Mon, 28 Nov 2016 10:12:09 +0000 (+0900) Subject: sound_manager API changed X-Git-Tag: accepted/tizen/3.0/common/20161205.091527^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F21%2F100521%2F3;p=platform%2Fcore%2Fapi%2Faudio-io.git sound_manager API changed Change-Id: I7add990057091065971ba65150c234698b6f4806 Signed-off-by: aravind.gara --- diff --git a/test/audio_io_test.c b/test/audio_io_test.c index ca89a73..08c800a 100644 --- a/test/audio_io_test.c +++ b/test/audio_io_test.c @@ -295,16 +295,12 @@ FILE *fp_w = NULL; sound_stream_info_h g_stream_info_read_h = NULL; sound_stream_info_h g_stream_info_write_h = NULL; -static void focus_callback(sound_stream_info_h stream_info, sound_stream_focus_change_reason_e reason_for_change, const char *additional_info, void *user_data) +static void focus_callback(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) { - int ret = 0; - sound_stream_focus_state_e playback_focus_state; - sound_stream_focus_state_e recording_focus_state; printf("*** focus_callback_read is called, stream_info(%p, read(%p)/write(%p)) ***\n", stream_info, g_stream_info_read_h, g_stream_info_write_h); printf(" - reason_for_change(%d), additional_info(%s), user_data(%p)\n", reason_for_change, additional_info, user_data); - ret = sound_manager_get_focus_state(stream_info, &playback_focus_state, &recording_focus_state); - if (!ret) - printf(" - focus_state(playback_focus:%d, recording_focus:%d)\n", playback_focus_state, recording_focus_state); + printf(" - focus_state is :%d \n", focus_state); return; } @@ -468,7 +464,7 @@ int audio_io_async_test(int mode) if (ret) printf("fail to audio_in_set_stream_info(), ret(0x%x)\n", ret); - ret = sound_manager_acquire_focus(g_stream_info_read_h, SOUND_STREAM_FOCUS_FOR_RECORDING, NULL); + ret = sound_manager_acquire_focus(g_stream_info_read_h, SOUND_STREAM_FOCUS_FOR_RECORDING, SOUND_BEHAVIOR_NONE, NULL); if (ret) { printf("fail to sound_manager_acquire_focus() for RECORDING, ret(0x%x)\n", ret); goto EXIT; @@ -512,7 +508,7 @@ int audio_io_async_test(int mode) if (ret) printf("fail to audio_out_set_stream_info(), ret(0x%x)\n", ret); - ret = sound_manager_acquire_focus(g_stream_info_write_h, SOUND_STREAM_FOCUS_FOR_PLAYBACK, NULL); + ret = sound_manager_acquire_focus(g_stream_info_write_h, SOUND_STREAM_FOCUS_FOR_PLAYBACK, SOUND_BEHAVIOR_NONE, NULL); if (ret) { printf("fail to sound_manager_acquire_focus() for PLAYBACK, ret(0x%x)\n", ret); goto EXIT; @@ -592,7 +588,7 @@ EXIT: if (g_stream_info_read_h) { ret = sound_manager_get_focus_state(g_stream_info_read_h, NULL, &recording_focus_state); if (recording_focus_state == SOUND_STREAM_FOCUS_STATE_ACQUIRED) { - ret = sound_manager_release_focus(g_stream_info_read_h, SOUND_STREAM_FOCUS_FOR_RECORDING, NULL); + ret = sound_manager_release_focus(g_stream_info_read_h, SOUND_STREAM_FOCUS_FOR_RECORDING, SOUND_BEHAVIOR_NONE, NULL); if (ret) printf("fail to sound_manager_release_focus() for recording, ret(0x%x)\n", ret); } @@ -614,7 +610,7 @@ EXIT: if (g_stream_info_write_h) { ret = sound_manager_get_focus_state(g_stream_info_write_h, &playback_focus_state, NULL); if (playback_focus_state == SOUND_STREAM_FOCUS_STATE_ACQUIRED) { - ret = sound_manager_release_focus(g_stream_info_write_h, SOUND_STREAM_FOCUS_FOR_PLAYBACK, NULL); + ret = sound_manager_release_focus(g_stream_info_write_h, SOUND_STREAM_FOCUS_FOR_PLAYBACK, SOUND_BEHAVIOR_NONE, NULL); if (ret) printf("fail to sound_manager_release_focus() for playback, ret(0x%x)\n", ret); }