mirror of
https://github.com/esphome/esphome.git
synced 2024-11-27 17:27:59 +01:00
some extra fixes
This commit is contained in:
parent
4e03bb977e
commit
bf1edaf0d9
1 changed files with 1 additions and 1 deletions
|
@ -435,7 +435,7 @@ void VoiceAssistant::loop() {
|
||||||
void VoiceAssistant::write_speaker_() {
|
void VoiceAssistant::write_speaker_() {
|
||||||
if ((this->speaker_ != nullptr) && (this->speaker_buffer_ != nullptr)) {
|
if ((this->speaker_ != nullptr) && (this->speaker_buffer_ != nullptr)) {
|
||||||
if (this->speaker_buffer_size_ > 0) {
|
if (this->speaker_buffer_size_ > 0) {
|
||||||
size_t write_chunk = std::min<size_t>(this->speaker_buffer_size_, 4 * 1024);
|
// size_t write_chunk = std::min<size_t>(this->speaker_buffer_size_, 4 * 1024);
|
||||||
size_t written = 0; // this->speaker_->play(this->speaker_buffer_, write_chunk);
|
size_t written = 0; // this->speaker_->play(this->speaker_buffer_, write_chunk);
|
||||||
if (written > 0) {
|
if (written > 0) {
|
||||||
memmove(this->speaker_buffer_, this->speaker_buffer_ + written, this->speaker_buffer_size_ - written);
|
memmove(this->speaker_buffer_, this->speaker_buffer_ + written, this->speaker_buffer_size_ - written);
|
||||||
|
|
Loading…
Reference in a new issue