Loading system/bta/le_audio/client.cc +11 −4 Original line number Diff line number Diff line Loading @@ -2134,6 +2134,12 @@ class LeAudioClientImpl : public LeAudioClient { } } void CleanCachedMicrophoneData() { cached_channel_data_.clear(); cached_channel_timestamp_ = 0; cached_channel_is_left_ = false; } void SendAudioData(uint8_t* data, uint16_t size, uint16_t cis_conn_hdl, uint32_t timestamp) { /* Get only one channel for MONO microphone */ Loading Loading @@ -2226,9 +2232,9 @@ class LeAudioClientImpl : public LeAudioClient { &pcm_data_decoded, nullptr); return; } /* both devices are connected */ if (cached_channel_timestamp_ == 0) { if (cached_channel_timestamp_ == 0 && cached_channel_data_.empty()) { /* First packet received, cache it. We need both channel data to send it * to AF. */ cached_channel_data_ = pcm_data_decoded; Loading @@ -2252,7 +2258,7 @@ class LeAudioClientImpl : public LeAudioClient { &pcm_data_decoded, &cached_channel_data_); } cached_channel_timestamp_ = 0; CleanCachedMicrophoneData(); return; } Loading Loading @@ -2416,7 +2422,8 @@ class LeAudioClientImpl : public LeAudioClient { uint16_t remote_delay_ms = group->GetRemoteDelay(le_audio::types::kLeAudioDirectionSource); cached_channel_timestamp_ = 0; CleanCachedMicrophoneData(); if (CodecManager::GetInstance()->GetCodecLocation() == le_audio::types::CodecLocation::HOST) { if (lc3_decoder_left_mem) { Loading Loading
system/bta/le_audio/client.cc +11 −4 Original line number Diff line number Diff line Loading @@ -2134,6 +2134,12 @@ class LeAudioClientImpl : public LeAudioClient { } } void CleanCachedMicrophoneData() { cached_channel_data_.clear(); cached_channel_timestamp_ = 0; cached_channel_is_left_ = false; } void SendAudioData(uint8_t* data, uint16_t size, uint16_t cis_conn_hdl, uint32_t timestamp) { /* Get only one channel for MONO microphone */ Loading Loading @@ -2226,9 +2232,9 @@ class LeAudioClientImpl : public LeAudioClient { &pcm_data_decoded, nullptr); return; } /* both devices are connected */ if (cached_channel_timestamp_ == 0) { if (cached_channel_timestamp_ == 0 && cached_channel_data_.empty()) { /* First packet received, cache it. We need both channel data to send it * to AF. */ cached_channel_data_ = pcm_data_decoded; Loading @@ -2252,7 +2258,7 @@ class LeAudioClientImpl : public LeAudioClient { &pcm_data_decoded, &cached_channel_data_); } cached_channel_timestamp_ = 0; CleanCachedMicrophoneData(); return; } Loading Loading @@ -2416,7 +2422,8 @@ class LeAudioClientImpl : public LeAudioClient { uint16_t remote_delay_ms = group->GetRemoteDelay(le_audio::types::kLeAudioDirectionSource); cached_channel_timestamp_ = 0; CleanCachedMicrophoneData(); if (CodecManager::GetInstance()->GetCodecLocation() == le_audio::types::CodecLocation::HOST) { if (lc3_decoder_left_mem) { Loading