Ejemplo n.º 1
0
void KaraokeWidget::stopKaraoke()
{
    m_karaokeMutex.lock();
    KaraokeSong * k = m_karaoke;
    m_karaoke = 0;
    m_karaokeMutex.unlock();

    // If we stopped our background, start it
    if ( k )
    {
        if ( k->hasCustomBackground() )
            m_background->pause( false );

        k->stop();
    }

    delete k;

    pCurrentState->saveTempData();
}
Ejemplo n.º 2
0
void KaraokeWidget::stopKaraoke()
{
    Logger::debug("KaraokeWidget::stopKaraoke");
    pCurrentState->playerState = CurrentState::PLAYERSTATE_STOPPED;

    m_karaokeMutex.lock();
    KaraokeSong * k = m_karaoke;
    m_karaoke = 0;
    m_karaokeMutex.unlock();

    // Is anything playing?
    if ( k == 0 )
        return;

    // If we stopped our background, start it
    if ( k->hasCustomBackground() )
        m_background->pause( false );

    k->stop();
    delete k;

    pCurrentState->saveTempData();
    Logger::debug("KaraokeWidget::stopKaraoke finished");
}