mirror of
https://github.com/78/xiaozhi-esp32.git
synced 2025-08-06 10:19:44 +08:00
@ -176,7 +176,7 @@ void K10AudioCodec::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), 40.0));
|
||||
ESP_ERROR_CHECK(esp_codec_dev_set_in_gain(input_dev_, 37.5)); //麦克风增益解决收音太小的问题
|
||||
} else {
|
||||
ESP_ERROR_CHECK(esp_codec_dev_close(input_dev_));
|
||||
}
|
||||
@ -223,4 +223,4 @@ int K10AudioCodec::Write(const int16_t* data, int samples) {
|
||||
return bytes_written / sizeof(int32_t);
|
||||
}
|
||||
return samples;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user