aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/Effect/crossfade/crossfadeplugin.h
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2010-09-05 18:48:11 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2010-09-05 18:48:11 +0000
commit2556538c0d583c4800df9052338ebcebabc3ae58 (patch)
treec3c38e88e8ff3e4df559f68f08870506205af727 /src/plugins/Effect/crossfade/crossfadeplugin.h
parent1da8e3fad8cefec56cf8dcf5580189bab9cc96cf (diff)
downloadqmmp-2556538c0d583c4800df9052338ebcebabc3ae58.tar.gz
qmmp-2556538c0d583c4800df9052338ebcebabc3ae58.tar.bz2
qmmp-2556538c0d583c4800df9052338ebcebabc3ae58.zip
added crossfade plugin (experimental) (Closes issue 272)
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@1874 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/Effect/crossfade/crossfadeplugin.h')
-rw-r--r--src/plugins/Effect/crossfade/crossfadeplugin.h61
1 files changed, 61 insertions, 0 deletions
diff --git a/src/plugins/Effect/crossfade/crossfadeplugin.h b/src/plugins/Effect/crossfade/crossfadeplugin.h
new file mode 100644
index 000000000..ec025aded
--- /dev/null
+++ b/src/plugins/Effect/crossfade/crossfadeplugin.h
@@ -0,0 +1,61 @@
+/***************************************************************************
+ * Copyright (C) 2010 by Ilya Kotov *
+ * forkotov02@hotmail.ru *
+ * *
+ * 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., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#ifndef CROSSFADEPLUGIN_H
+#define CROSSFADEPLUGIN_H
+
+#include <QMutex>
+#include <qmmp/effect.h>
+
+class SoundCore;
+class StateHandler;
+
+/**
+ @author Ilya Kotov <forkotov02@hotmail.ru>
+*/
+
+class CrossfadePlugin : public Effect
+{
+public:
+ CrossfadePlugin();
+
+ virtual ~CrossfadePlugin();
+
+ void applyEffect(Buffer *b);
+ void configure(quint32 freq, int chan, Qmmp::AudioFormat format);
+
+private:
+ enum State
+ {
+ WAITING = 0,
+ PREPARING,
+ PROCESSING,
+ };
+
+ uchar *m_buffer;
+ ulong m_buffer_at;
+ ulong m_buffer_size;
+ qint64 m_overlap;
+ int m_state;
+ SoundCore *m_core;
+ StateHandler *m_handler;
+
+};
+
+#endif