Add audio debugger

This commit is contained in:
Terrence
2025-06-06 20:24:00 +08:00
parent 24ede22197
commit 7bc5f7bb0c
11 changed files with 170 additions and 5 deletions

View File

@@ -13,7 +13,7 @@
#define AUDIO_CODEC_DMA_DESC_NUM 6
#define AUDIO_CODEC_DMA_FRAME_NUM 240
#define AUDIO_CODEC_DEFAULT_MIC_GAIN 36.0
#define AUDIO_CODEC_DEFAULT_MIC_GAIN 30.0
class AudioCodec {
public:

View File

@@ -199,7 +199,7 @@ void BoxAudioCodec::EnableInput(bool enable) {
fs.channel_mask |= ESP_CODEC_DEV_MAKE_CHANNEL_MASK(1);
}
ESP_ERROR_CHECK(esp_codec_dev_open(input_dev_, &fs));
ESP_ERROR_CHECK(esp_codec_dev_set_in_channel_gain(input_dev_, ESP_CODEC_DEV_MAKE_CHANNEL_MASK(0), 36.0));
ESP_ERROR_CHECK(esp_codec_dev_set_in_channel_gain(input_dev_, ESP_CODEC_DEV_MAKE_CHANNEL_MASK(0), AUDIO_CODEC_DEFAULT_MIC_GAIN));
} else {
ESP_ERROR_CHECK(esp_codec_dev_close(input_dev_));
}