This commit is contained in:
e2002
2022-08-17 14:11:17 +03:00
parent 442d970fd9
commit 8fa32f1587
19 changed files with 3348 additions and 2611 deletions

View File

@@ -49,6 +49,7 @@ void Player::init() {
requestToStart = true;
volTimer=false;
zeroRequest();
playmutex = xSemaphoreCreateMutex();
}
void Player::stopInfo() {
@@ -70,6 +71,7 @@ void Player::loop() {
//stopSong();
setDefaults();
stopInfo();
xSemaphoreGive(playmutex);
if (player_on_stop_play) player_on_stop_play();
}
}
@@ -110,6 +112,8 @@ void Player::setOutputPins(bool isPlaying) {
void Player::play(uint16_t stationId) {
//stopSong();
xSemaphoreGive(playmutex);
xSemaphoreTake(playmutex, portMAX_DELAY);
setDefaults();
setOutputPins(false);
config.setTitle("[connecting]");