From: wn.jang Date: Wed, 25 Mar 2020 08:21:50 +0000 (+0900) Subject: Support multi-channel audio input X-Git-Tag: submit/tizen/20200326.093720~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a16bfdb58360d1087a5ea41d12927d9b7084bb54;p=platform%2Fcore%2Fuifw%2Fvoice-control.git Support multi-channel audio input Change-Id: Ib65dca91ab5c5f208d1bd1708ee3f88ca0734395 --- diff --git a/server/vcd_recorder.c b/server/vcd_recorder.c index 96abd7b..bfa8fd3 100644 --- a/server/vcd_recorder.c +++ b/server/vcd_recorder.c @@ -648,14 +648,20 @@ int vcd_recorder_set(const char* audio_type, vce_audio_type_e type, int rate, in SLOG(LOG_INFO, TAG_VCD, "[Recorder] New audio type(%d) rate(%d) channel(%d)", type, rate, channel); audio_in_destroy(g_audio_h); - audio_channel_e audio_ch; + audio_channel_e audio_ch = AUDIO_CHANNEL_MONO; audio_sample_type_e audio_sample_type; switch (channel) { case 1: audio_ch = AUDIO_CHANNEL_MONO; break; case 2: audio_ch = AUDIO_CHANNEL_STEREO; break; + case 3: audio_ch = AUDIO_CHANNEL_MULTI_3; break; + case 4: audio_ch = AUDIO_CHANNEL_MULTI_4; break; + case 5: audio_ch = AUDIO_CHANNEL_MULTI_5; break; + case 6: audio_ch = AUDIO_CHANNEL_MULTI_6; break; + case 7: audio_ch = AUDIO_CHANNEL_MULTI_7; break; + case 8: audio_ch = AUDIO_CHANNEL_MULTI_8; break; default: - SLOG(LOG_ERROR, TAG_VCD, "[Recorder ERROR] Input channel is not supported"); + SLOG(LOG_ERROR, TAG_VCD, "[Recorder ERROR] Input channel is not supported, audio_ch(%d)", audio_ch); return VCD_ERROR_OPERATION_FAILED; break; }