diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2009-12-06 18:20:45 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2009-12-06 18:20:45 +0000 |
| commit | 648d09c5cea5ad4c2e31d51ff804ec32b23ac458 (patch) | |
| tree | 4f6f236373690c7ad65720fbdf1bd8498ac99c81 /src/plugins/Effect/srconverter | |
| parent | 6c37e46ff15eab4ccd47b6162a3d350aa35b7b39 (diff) | |
| download | qmmp-648d09c5cea5ad4c2e31d51ff804ec32b23ac458.tar.gz qmmp-648d09c5cea5ad4c2e31d51ff804ec32b23ac458.tar.bz2 qmmp-648d09c5cea5ad4c2e31d51ff804ec32b23ac458.zip | |
changed effect api
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@1425 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/Effect/srconverter')
4 files changed, 13 insertions, 21 deletions
diff --git a/src/plugins/Effect/srconverter/effectsrconverterfactory.cpp b/src/plugins/Effect/srconverter/effectsrconverterfactory.cpp index 6b259fa89..86490cdfc 100644 --- a/src/plugins/Effect/srconverter/effectsrconverterfactory.cpp +++ b/src/plugins/Effect/srconverter/effectsrconverterfactory.cpp @@ -21,8 +21,8 @@ #include <QtGui> #include <qmmp/qmmp.h> #include "settingsdialog.h" -#include "effectsrconverterfactory.h" #include "srconverter.h" +#include "effectsrconverterfactory.h" const EffectProperties EffectSRConverterFactory::properties() const { @@ -32,25 +32,25 @@ const EffectProperties EffectSRConverterFactory::properties() const properties.hasSettings = TRUE; properties.hasAbout = TRUE; return properties; -}; +} -Effect *EffectSRConverterFactory::create(QObject *parent) +Effect *EffectSRConverterFactory::create() { - return new SRConverter(parent); -}; + return new SRConverter(); +} void EffectSRConverterFactory::showSettings(QWidget *parent) { SettingsDialog *s = new SettingsDialog(parent); s ->show(); -}; +} void EffectSRConverterFactory::showAbout(QWidget *parent) { QMessageBox::about (parent, tr("About Sample Rate Converter Plugin"), tr("Qmmp Sample Rate Converter Plugin")+"\n"+ tr("Writen by: Ilya Kotov <forkotov02@hotmail.ru>")); -}; +} QTranslator *EffectSRConverterFactory::createTranslator(QObject *parent) { @@ -58,6 +58,6 @@ QTranslator *EffectSRConverterFactory::createTranslator(QObject *parent) QString locale = Qmmp::systemLanguageID(); translator->load(QString(":/srconverter_plugin_") + locale); return translator; -}; +} Q_EXPORT_PLUGIN2(srconverter, EffectSRConverterFactory) diff --git a/src/plugins/Effect/srconverter/effectsrconverterfactory.h b/src/plugins/Effect/srconverter/effectsrconverterfactory.h index c9854a18b..fb98d4cb6 100644 --- a/src/plugins/Effect/srconverter/effectsrconverterfactory.h +++ b/src/plugins/Effect/srconverter/effectsrconverterfactory.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2007 by Ilya Kotov * + * Copyright (C) 2007-2009 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -20,9 +20,7 @@ #ifndef EFFECTSRCONVERTERFACTORY_H #define EFFECTSRCONVERTERFACTORY_H - #include <QObject> - #include <qmmp/effectfactory.h> #include <qmmp/effect.h> @@ -36,7 +34,7 @@ Q_INTERFACES(EffectFactory); public: const EffectProperties properties() const; - Effect *create(QObject *parent); + Effect *create(); void showSettings(QWidget *parent); void showAbout(QWidget *parent); QTranslator *createTranslator(QObject *parent); diff --git a/src/plugins/Effect/srconverter/srconverter.cpp b/src/plugins/Effect/srconverter/srconverter.cpp index ca871e409..8a31bb18f 100644 --- a/src/plugins/Effect/srconverter/srconverter.cpp +++ b/src/plugins/Effect/srconverter/srconverter.cpp @@ -25,7 +25,7 @@ #include "srconverter.h" -SRConverter::SRConverter(QObject* parent) : Effect(parent) +SRConverter::SRConverter() : Effect() { m_isSrcAlloc = FALSE; int converter_type_array[] = {SRC_SINC_BEST_QUALITY, SRC_SINC_MEDIUM_QUALITY, SRC_SINC_FASTEST, diff --git a/src/plugins/Effect/srconverter/srconverter.h b/src/plugins/Effect/srconverter/srconverter.h index e596c693a..bb4c2913c 100644 --- a/src/plugins/Effect/srconverter/srconverter.h +++ b/src/plugins/Effect/srconverter/srconverter.h @@ -20,12 +20,8 @@ #ifndef SRCONVERTER_H #define SRCONVERTER_H -#include <qmmp/effect.h> - -extern "C" -{ #include <samplerate.h> -} +#include <qmmp/effect.h> /** @author Ilya Kotov <forkotov02@hotmail.ru> @@ -33,10 +29,8 @@ extern "C" class SRConverter : public Effect { - Q_OBJECT public: - SRConverter(QObject *parent = 0); - + SRConverter(); virtual ~SRConverter(); ulong process(char *in_data, const ulong size, char **out_data); |
