make sure that only the component locking is in place.

This commit is contained in:
NP v/d Spek 2024-10-25 21:08:54 +02:00
parent c245c554e2
commit 8567c6f523

View file

@ -201,9 +201,6 @@ size_t I2SAudioSpeaker::play(const uint8_t *data, size_t length, TickType_t tick
ESP_LOGE(TAG, "Cannot play new audio, it being used by an other audio component."); ESP_LOGE(TAG, "Cannot play new audio, it being used by an other audio component.");
return 0; return 0;
} }
if (this->state_ == speaker::STATE_STOPPING) {
return 0;
}
if (this->state_ != speaker::STATE_RUNNING && this->state_ != speaker::STATE_STARTING) { if (this->state_ != speaker::STATE_RUNNING && this->state_ != speaker::STATE_STARTING) {
this->start(); this->start();