 
   // Same key pressed again
   } else if (state == PLAY_SELECTED && playingAlbum == index) {
+    nextTimeoutTick = 0; // no timeout during playing
     stopPlaying();
     onTryNextTrack();
 
   // Some (other) key pressed
   } else {
     if (state == PLAY_SELECTED) stopPlaying();
+    nextTimeoutTick = 0; // no timeout during playing
     enablePlayer(true);
     enableAmplifier(!headset);
     onStartFirstTrack(index);

    trellis.blinkRate(HT16K33_BLINK_HALFHZ);
    player.pausePlaying(true);
    enableAmplifier(false);
    state = PLAY_PAUSED;
  } else {
    Serial.println("Resume");
    trellis.blinkRate(HT16K33_BLINK_1HZ);
    enableAmplifier(!headset);
    player.pausePlaying(false);
    state = PLAY_SELECTED;
  }
}

  // Read encoder switch
  ClickEncoder::Button button = encoder.getButton();
  if (button == ClickEncoder::Clicked) {
    switch (state) {
      case PLAY_SELECTED: onPause(true); break;
      case PLAY_PAUSED:   onPause(false); break;
    }
  } else if (button == ClickEncoder::Held) {
    switch (state) {
      case PLAY_SELECTED:
      case PLAY_PAUSED:
        Serial.print("Stopped #"); Serial.println(playingAlbum);
        blinkLED(BLUE_LED_PIN);
        stopPlaying();
        onStopPlaying();
      break;
    }
  }

