TEST_F(CueControlTest, LoadUnloadTrack) { TrackPointer pTrack = createTestTrack(); pTrack->setCuePoint(CuePosition(100.0, Cue::MANUAL)); auto pIntro = pTrack->createAndAddCue(); pIntro->setType(Cue::INTRO); pIntro->setSource(Cue::MANUAL); pIntro->setPosition(150.0); pIntro->setLength(50.0); auto pOutro = pTrack->createAndAddCue(); pOutro->setType(Cue::OUTRO); pOutro->setSource(Cue::MANUAL); pOutro->setPosition(250.0); pOutro->setLength(50.0); loadTrack(pTrack); EXPECT_DOUBLE_EQ(100.0, m_pCuePoint->get()); EXPECT_DOUBLE_EQ(150.0, m_pIntroStartPosition->get()); EXPECT_DOUBLE_EQ(200.0, m_pIntroEndPosition->get()); EXPECT_DOUBLE_EQ(250.0, m_pOutroStartPosition->get()); EXPECT_DOUBLE_EQ(300.0, m_pOutroEndPosition->get()); EXPECT_TRUE(m_pIntroStartEnabled->toBool()); EXPECT_TRUE(m_pIntroEndEnabled->toBool()); EXPECT_TRUE(m_pOutroStartEnabled->toBool()); EXPECT_TRUE(m_pOutroEndEnabled->toBool()); unloadTrack(); EXPECT_DOUBLE_EQ(-1.0, m_pCuePoint->get()); EXPECT_DOUBLE_EQ(-1.0, m_pIntroStartPosition->get()); EXPECT_DOUBLE_EQ(-1.0, m_pIntroEndPosition->get()); EXPECT_DOUBLE_EQ(-1.0, m_pOutroStartPosition->get()); EXPECT_DOUBLE_EQ(-1.0, m_pOutroEndPosition->get()); EXPECT_FALSE(m_pIntroStartEnabled->toBool()); EXPECT_FALSE(m_pIntroEndEnabled->toBool()); EXPECT_FALSE(m_pOutroStartEnabled->toBool()); EXPECT_FALSE(m_pOutroEndEnabled->toBool()); }
DlgTrackInfo::~DlgTrackInfo() { unloadTrack(false); qDebug() << "~DlgTrackInfo()"; }
DlgTrackInfo::~DlgTrackInfo() { unloadTrack(false); }
void DlgTrackInfo::cancel() { unloadTrack(false); reject(); }
void DlgTrackInfo::OK() { unloadTrack(true); accept(); }
BaseTrackPlayerImpl::~BaseTrackPlayerImpl() { unloadTrack(); }