if (buffer_size != BUFFER_LENGTH)
SLOG(LOG_DEBUG, TAG_VCD, "[Recorder test] Get data size(%d)", buffer_size);
+ buffer_size = MIN(buffer_size, BUFFER_LENGTH);
+
if (NULL != g_audio_cb && buffer_size != 0)
g_audio_cb(buffer, buffer_size);
- float vol_db = get_volume_decibel(buffer, BUFFER_LENGTH);
+ float vol_db = get_volume_decibel(buffer, buffer_size);
if (0 != vcdc_send_set_volume(vcd_client_manager_get_pid(), vol_db))
SLOG(LOG_ERROR, TAG_VCD, "[Recorder test] Fail to send recording volume(%f)", vol_db);