From: sooyeon.kim Date: Fri, 31 Jul 2020 06:04:08 +0000 (+0900) Subject: Add to set audio handles as NULL X-Git-Tag: submit/tizen/20200731.062014^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6593c97c375e67532e6eca421d9889ff3a1d8093;p=platform%2Fcore%2Fuifw%2Fvoice-control.git Add to set audio handles as NULL Change-Id: I5bd36e406a7021764fc469b7f639d56e77a89687 Signed-off-by: sooyeon.kim --- diff --git a/server/vcd_recorder.c b/server/vcd_recorder.c index dddc02c..8695383 100644 --- a/server/vcd_recorder.c +++ b/server/vcd_recorder.c @@ -559,14 +559,17 @@ int vcd_recorder_destroy() int ret = sound_manager_remove_device_connection_changed_cb(g_device_id); if (0 != ret) SLOG(LOG_ERROR, TAG_VCD, "[Recorder ERROR] Fail to remove device connection changed callback, ret(%d)", ret); + g_device_id = -1; ret = sound_manager_destroy_stream_information(g_stream_info_h); if (0 != ret) SLOG(LOG_ERROR, TAG_VCD, "[Recorder ERROR] Fail to destroy stream info, ret(%d)", ret); + g_stream_info_h = NULL; ret = audio_in_destroy(g_audio_h); if (0 != ret) SLOG(LOG_ERROR, TAG_VCD, "[Recorder ERROR] Fail to audio in destroy, ret(%d)", ret); + g_audio_h = NULL; #ifdef TV_FFV_MODE if (NULL != g_farfieldvoice_h) { @@ -679,6 +682,7 @@ int vcd_recorder_set(const char* audio_type, vce_audio_type_e type, int rate, in if (g_audio_type != type || g_audio_rate != rate || g_audio_channel != channel) { SLOG(LOG_INFO, TAG_VCD, "[Recorder] New audio type(%d) rate(%d) channel(%d)", type, rate, channel); audio_in_destroy(g_audio_h); + g_audio_h = NULL; audio_channel_e audio_ch = AUDIO_CHANNEL_MONO; audio_sample_type_e audio_sample_type; @@ -908,6 +912,7 @@ static void __check_audio_format() if (g_audio_type != type || g_audio_rate != rate || g_audio_channel != channel) { SLOG(LOG_INFO, TAG_VCD, "[Recorder] New audio type(%d) rate(%d) channel(%d)", type, rate, channel); audio_in_destroy(g_audio_h); + g_audio_h = NULL; audio_channel_e audio_ch; audio_sample_type_e audio_type;