+#ifdef TV_FFV_MODE
+static void _ffv_audio_function_cb(void* data, unsigned int length, void* user_data)
+{
+ if (0 == g_buffer_count % 50) {
+ SLOG(LOG_INFO, TAG_STTD, "[Recorder INFO] farfield audio function callback is invoked");
+
+ if (100000 == g_buffer_count) {
+ g_buffer_count = 0;
+ }
+ }
+
+ g_buffer_count++;
+
+ if (NULL != g_audio_cb) {
+ if (0 != g_audio_cb(data, length)) {
+ SLOG(LOG_ERROR, TAG_STTD, "[Recorder ERROR] Fail to read audio");
+ sttd_recorder_stop();
+ }
+
+ if (NULL == g_recorder) {
+ SLOG(LOG_INFO, TAG_STTD, "[Recorder INFO] g_recoder is NULL");
+ return;
+ }
+
+ float vol_db = get_volume_decibel((char*)data, (int)length, g_recorder->audio_type);
+ if (0 != sttdc_send_set_volume(g_recorder->uid, vol_db)) {
+ SLOG(LOG_ERROR, TAG_STTD, "[Recorder] Fail to send recording volume(%f)", vol_db);
+ }
+ }
+}
+#endif