From: sooyeon.kim Date: Fri, 31 Jul 2020 05:24:11 +0000 (+0900) Subject: Add to send set volume in audio_streaming_cb X-Git-Tag: submit/tizen/20200731.062014~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0142ddac3902c466834d6665a0ab99b557537f30;p=platform%2Fcore%2Fuifw%2Fvoice-control.git Add to send set volume in audio_streaming_cb Change-Id: If302fa2feebff6fe2f2ac4c54448cdcf9d36f4d5 Signed-off-by: sooyeon.kim --- diff --git a/server/vcd_recorder.c b/server/vcd_recorder.c index c781470..dddc02c 100644 --- a/server/vcd_recorder.c +++ b/server/vcd_recorder.c @@ -276,6 +276,14 @@ void audio_streaming_cb(ma_audio_streaming_event_e event, char* buffer, int len, SLOG(LOG_ERROR, TAG_VCD, "[Recorder ERROR] Fail to read audio"); } } + + /* Set volume */ + if (0 == g_buffer_count % 15) { + float vol_db = get_volume_decibel(buffer, len); + if (0 != vcdc_send_set_volume(vcd_client_manager_get_pid(), vol_db)) { + SLOG(LOG_ERROR, TAG_VCD, "[Recorder] Fail to send recording volume(%f)", vol_db); + } + } } #if 1