make sure that only the component locking is in place.

This commit is contained in:
NP v/d Spek 2024-10-25 21:12:11 +02:00
parent 70a0d0a54b
commit 7361247c1b

View file

@ -242,9 +242,8 @@ void I2SAudioSpeaker::speaker_task(void *params) {
pdFALSE, // Don't wait for all the bits,
portMAX_DELAY); // Block indefinitely until a bit is set
if (event_group_bits & (SpeakerEventGroupBits::COMMAND_STOP |
SpeakerEventGroupBits::COMMAND_STOP_GRACEFULLY)) { // Received a stop signal before the task
// was requested to start
if (event_group_bits & (SpeakerEventGroupBits::COMMAND_STOP | SpeakerEventGroupBits::COMMAND_STOP_GRACEFULLY)) {
// Received a stop signal before the task was requested to start
this_speaker->delete_task_(0);
}