Enhance audio service: Add mutex for input resampler and reset logic to prevent buffer overflow during mode switching (#1653)

This commit is contained in:
Xiaoxia
2026-01-14 02:17:41 +08:00
committed by GitHub
parent b48506171b
commit 2ff3796289
2 changed files with 18 additions and 0 deletions

View File

@ -142,6 +142,7 @@ private:
void* opus_encoder_ = nullptr;
void* opus_decoder_ = nullptr;
std::mutex decoder_mutex_;
std::mutex input_resampler_mutex_;
esp_ae_rate_cvt_handle_t input_resampler_ = nullptr;
esp_ae_rate_cvt_handle_t output_resampler_ = nullptr;