v0.7.355
This commit is contained in:
@@ -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]");
|
||||
|
||||
Reference in New Issue
Block a user