Send audio streaming request on ACTIVE state event only
authorJi-hoon Lee <dalton.lee@samsung.com>
Tue, 18 Aug 2020 04:45:44 +0000 (13:45 +0900)
committerJi-hoon Lee <dalton.lee@samsung.com>
Tue, 18 Aug 2020 04:45:51 +0000 (13:45 +0900)
Change-Id: I7fb53073c6eaf429e85ace2c6b73f1df36c428e9

client/ma.c

index 041aadf0e4d63f7ab9f6dc96038c1412b3ee130e..fab8176d3f8e68802ff0feadce02a75852783dd3 100644 (file)
@@ -572,7 +572,9 @@ int __ma_cb_active_state_changed(int state)
                "[INFO] previous : %d , current : %d active state changed",
                previous_state, current_state
        );
-       ma_start_receiving_audio_streaming_data(MA_AUDIO_STREAMING_DATA_TYPE_CURRENT_UTTERANCE);
+       if (MA_ACTIVE_STATE_ACTIVE == state) {
+               ma_start_receiving_audio_streaming_data(MA_AUDIO_STREAMING_DATA_TYPE_CURRENT_UTTERANCE);
+       }
 
        return 0;
 }