diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2009-07-14 19:15:32 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2009-07-14 19:15:32 +0000 |
| commit | 40ee4f96d507067c453c1a790857107ad0c83924 (patch) | |
| tree | caeed8eb76f2b5dee833e6401bd1d30ffdf03c94 /src/qmmpui/mediaplayer.cpp | |
| parent | 5c8df5c01f76d86a18b221cd11122abaa0da0478 (diff) | |
| download | qmmp-40ee4f96d507067c453c1a790857107ad0c83924.tar.gz qmmp-40ee4f96d507067c453c1a790857107ad0c83924.tar.bz2 qmmp-40ee4f96d507067c453c1a790857107ad0c83924.zip | |
improved cue support (very unstable)
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@1033 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/qmmpui/mediaplayer.cpp')
| -rw-r--r-- | src/qmmpui/mediaplayer.cpp | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/src/qmmpui/mediaplayer.cpp b/src/qmmpui/mediaplayer.cpp index 0f6b7a79f..3f7545091 100644 --- a/src/qmmpui/mediaplayer.cpp +++ b/src/qmmpui/mediaplayer.cpp @@ -64,6 +64,7 @@ void MediaPlayer::initialize(SoundCore *core, PlayListModel *model) m_model = model; m_repeat = FALSE; connect(m_core, SIGNAL(finished()), SLOT(next())); + connect(m_core, SIGNAL(aboutToFinish()), SLOT(sendNext())); } PlayListModel *MediaPlayer::playListModel() @@ -78,7 +79,9 @@ bool MediaPlayer::isRepeatable() const void MediaPlayer::play() { + qDebug("+1"); m_model->doCurrentVisibleRequest(); + qDebug("+2"); if (m_core->state() == Qmmp::Paused) { m_core->pause(); @@ -87,12 +90,15 @@ void MediaPlayer::play() if (m_model->count() == 0) return; - + qDebug("+3"); QString s = m_model->currentItem()->url(); if (s.isEmpty()) return; + qDebug("+4"); + //m_core->setNext (m_model->nextItem()->url()); if (!m_core->play(s)) { + qDebug("+5"); //find out the reason why playback failed switch ((int) m_core->state()) { @@ -127,7 +133,19 @@ void MediaPlayer::play() } } else + { + qDebug("1"); m_skips = 0; + qDebug("2"); + if(m_model->nextItem()) + { + qDebug("3"); + m_core->setNext (m_model->nextItem()->url()); + qDebug("MediaPlayer: current item: %s",qPrintable(m_core->url())); + qDebug("MediaPlayer: next item: %s",qPrintable(m_core->nextUrl())); + qDebug("4"); + } + } } void MediaPlayer::stop() @@ -190,3 +208,10 @@ void MediaPlayer::setRepeatable(bool r) m_repeat = r; emit repeatableChanged(r); } + +void MediaPlayer::sendNext() +{ + /*if(m_model->nextItem()) + qDebug("MediaPlayer: next item: %s",qPrintable(m_model->nextItem()->url()));*/ +} + |
