Ignore to call FFV audio_callback when it is not recording state 84/222684/4
authorwn.jang <wn.jang@samsung.com>
Fri, 17 Jan 2020 07:00:43 +0000 (16:00 +0900)
committerWonnam Jang <wn.jang@samsung.com>
Fri, 17 Jan 2020 07:09:44 +0000 (07:09 +0000)
Change-Id: I110f53faa8867bf39ca072fdcf6971ff954b1abc

server/sttd_recorder.c

index aaa5dee..ab4d3b0 100644 (file)
@@ -122,7 +122,7 @@ static void _bt_hid_audio_data_receive_cb(bt_hid_voice_data_s *voice_data, void
        }
 
        if (STTD_RECORDER_STATE_RECORDING != g_recorder_state) {
-               /* SLOG(LOG_DEBUG, TAG_STTD, "[Recorder] Exit audio reading normal func"); */
+               SLOG(LOG_INFO, TAG_STTD, "[Recorder] Exit audio reading normal func");
                return;
        }
 
@@ -168,6 +168,11 @@ static void _bt_hid_audio_data_receive_cb(bt_hid_voice_data_s *voice_data, void
 #ifdef TV_FFV_MODE
 static void _ffv_audio_function_cb(void* data, unsigned int length, void* user_data)
 {
+       if (STTD_RECORDER_STATE_RECORDING != g_recorder_state) {
+               SLOG(LOG_INFO, TAG_STTD, "[Recorder] Exit audio reading normal func");
+               return;
+       }
+
        if (0 >= sttd_client_get_ref_count()) {
                if (0 == g_buffer_count % 50) {
                        SLOG(LOG_INFO, TAG_STTD, "[Recorder INFO] farfield audio function callback is invoked, but no cliet");