Use buffer size as minimum value of buffer_size and BUFFER_LENGTH 37/230937/1
authorSuyeon Hwang <stom.hwang@samsung.com>
Thu, 16 Apr 2020 06:25:32 +0000 (15:25 +0900)
committerSuyeon Hwang <stom.hwang@samsung.com>
Thu, 16 Apr 2020 06:25:32 +0000 (15:25 +0900)
commitdbc1961a5ec3eb506588cd50cc95e57dad2f114c
treef3df0f061d5b6c196ace89616a1630e293f17c5b
parent3e5341178bab79d8ff5c442a0bb45a9ff0adf355
Use buffer size as minimum value of buffer_size and BUFFER_LENGTH

buffer_size can be different from BUFFER_LENGTH.
However, if buffer_size is bigger than BUFFER_LENGTH, buffer overflow can be occured.
Thus, I use minimum value of buffer_size and BUFFER_LENGTH as parameter.

And also, this patch pass the same variable to g_audio_cb and get_volume_decibel.

Change-Id: I1231f056226415e820b079da3241e5ee82f8793d
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
server/vcd_recorder.c