aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/General/scrobbler/scrobblerhandler.cpp
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2014-03-23 08:19:30 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2014-03-23 08:19:30 +0000
commit5c958473be8ad60ea638bceeba44a36fc243c73c (patch)
treef4ff73db64df13736940197268a55f3cb6e904c3 /src/plugins/General/scrobbler/scrobblerhandler.cpp
parent9fb3dbd510db10b2aab5aa347a422b7ac714bb76 (diff)
downloadqmmp-5c958473be8ad60ea638bceeba44a36fc243c73c.tar.gz
qmmp-5c958473be8ad60ea638bceeba44a36fc243c73c.tar.bz2
qmmp-5c958473be8ad60ea638bceeba44a36fc243c73c.zip
fixed qt-4.6 support
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@4198 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/General/scrobbler/scrobblerhandler.cpp')
0 files changed, 0 insertions, 0 deletions
* * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #include <QSettings> #include <qmmp/qmmp.h> #include <qmmp/statehandler.h> #include <qmmp/soundcore.h> #include "crossfadeplugin.h" CrossfadePlugin::CrossfadePlugin() : Effect() { m_buffer = 0; m_buffer_at = 0; m_buffer_size = 0; m_core = SoundCore::instance() ; m_handler = StateHandler::instance(); m_state = WAITING; QSettings settings(Qmmp::configFile(), QSettings::IniFormat); m_overlap = settings.value("Crossfade/overlap", 6000).toLongLong(); } CrossfadePlugin::~CrossfadePlugin() { if(m_buffer) free(m_buffer); } void CrossfadePlugin::applyEffect(Buffer *b) { switch (m_state) { case WAITING: if((m_core->totalTime() > m_overlap + 2000) && (m_core->totalTime() - m_handler->elapsed() < m_overlap + 2000)) { StateHandler::instance()->sendNextTrackRequest(); m_state = CHECKING; } return; case CHECKING: //next source has been received and current engine will be used to play it if(SoundCore::instance()->nextTrackAccepted()) m_state = PREPARING; else return; case PREPARING: