player stop logic fix

This commit is contained in:
Philippe G
2021-12-25 00:38:56 -08:00
parent 7f894f1635
commit 1422003271
2 changed files with 2 additions and 2 deletions

View File

@@ -136,6 +136,7 @@ static void cspotTask(void *pvParameters) {
break; break;
case CSpotEventType::DISC: case CSpotEventType::DISC:
cspot.cHandler(CSPOT_DISC); cspot.cHandler(CSPOT_DISC);
spircController->stopPlayer();
mercuryManager->stop(); mercuryManager->stop();
break; break;
case CSpotEventType::PREV: case CSpotEventType::PREV:

View File

@@ -53,7 +53,6 @@ void SpircController::setPause(bool isPaused, bool notifyPlayer) {
void SpircController::disconnect(void) { void SpircController::disconnect(void) {
player->cancelCurrentTrack(); player->cancelCurrentTrack();
stopPlayer();
state->setActive(false); state->setActive(false);
notify(); notify();
sendEvent(CSpotEventType::DISC); sendEvent(CSpotEventType::DISC);