void AudioPlayer::stopSeek() { //qDebug("AudioPlayer::stopSeek: m_oldVolume: %f", m_oldVolume); m_seeking = false; if(m_oldVolume) QTimer::singleShot(500, this, SLOT(restoreVolume())); }
static void processBlockEnterExit (CtnrBlock *block, EnumEnterOrExit enteringOrExiting) { unsigned int code, LEDhyperlink, speedChange, volumeChange; BOOL red, green, onoff, fliponoff; APP_IRAM static unsigned int enteringVolume; code = block->actionEnterExit; if (enteringOrExiting == ENTERING) { code &= 0x00FF; enteringVolume = getVolume(); } else { if (context.isHyperlinked && ((code & 0x00FF) == 0x04)) { // checks if enter action was hyperlink context.isHyperlinked = FALSE; setLED(LED_RED,FALSE); } code >>= 8; } if (code) { LEDhyperlink = code & 0x0F; // bits 0-3 speedChange = (code & 0x30) >> 4; // bits 4-5 volumeChange = (code & 0xC0) >> 6; // bits 6-7 switch (speedChange) { case 0x01: adjustSpeed(3,TRUE); break; case 0x02: adjustSpeed(-3,TRUE); break; case 0x03: adjustSpeed(NORMAL_SPEED,FALSE); break; } switch (volumeChange) { case 0x01: adjustVolume(3,TRUE,TRUE); break; case 0x02: adjustVolume(-3,TRUE,TRUE); break; case 0x03: //return to user selected volume restoreVolume(FALSE); break; } // switch if (LEDhyperlink == 0x04) { if (enteringOrExiting == ENTERING) { context.isHyperlinked = TRUE; context.USB = FALSE; setLED(LED_RED,TRUE); insertSound(&pkgSystem.files[HYPERLINK_SOUND_FILE_IDX],NULL,TRUE); } else { context.isHyperlinked = FALSE; setLED(LED_RED,FALSE); } } else { if (LEDhyperlink == 0x08) { context.USB = TRUE; stop(); setUSBDevice(TRUE); } else { green = LEDhyperlink & 0x01; red = LEDhyperlink & 0x02; onoff = LEDhyperlink & 0x04; fliponoff = LEDhyperlink & 0x08; if ((green && onoff) || (green && fliponoff)) setLED(LED_GREEN,TRUE); else if ((green && !onoff) || (!green && fliponoff)) setLED(LED_GREEN,FALSE); if ((red && onoff) || (red && fliponoff)) setLED(LED_RED,TRUE); else if ((red && !onoff) || (!red && fliponoff)) setLED(LED_RED,FALSE); } } } // if (code) }