summaryrefslogtreecommitdiffstats
path: root/src/replaygain.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-03-01 19:09:31 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-03-01 19:09:31 +0000
commitf2cfda2a54780868dfe0af7bd652fcd4906547da (patch)
treec6ac23545528f5701818424f2af5f79ce3665e6c /src/replaygain.h
downloadsoundkonverter-f2cfda2a54780868dfe0af7bd652fcd4906547da.tar.gz
soundkonverter-f2cfda2a54780868dfe0af7bd652fcd4906547da.zip
Added KDE3 version of SoundKonverter
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/soundkonverter@1097614 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/replaygain.h')
-rwxr-xr-xsrc/replaygain.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/src/replaygain.h b/src/replaygain.h
new file mode 100755
index 0000000..ff9e38a
--- /dev/null
+++ b/src/replaygain.h
@@ -0,0 +1,58 @@
+
+
+#ifndef REPLAYGAIN_H
+#define REPLAYGAIN_H
+
+#include <qobject.h>
+#include <qstringlist.h>
+
+class Config;
+class Logger;
+class KProcess;
+
+/**
+ * @short Starts a process to add/remove Replay Gain tags to/from a given file
+ * @author Daniel Faust <[email protected]>
+ * @version 0.3
+ */
+class ReplayGain : public QObject
+{
+ Q_OBJECT
+public:
+ enum Mode {
+ calc_track = 0x0001,
+ calc_album = 0x0002,
+ remove = 0x0004,
+ force = 0x0008
+ };
+
+ /**
+ * Constructor
+ */
+ ReplayGain( Config*, Logger* );
+
+ /**
+ * Destructor
+ */
+ virtual ~ReplayGain();
+
+ /**
+ * Add/remove Replay Gain
+ * @param files a list of files (of the same format)
+ * @param format the format of the file/files (extension or mime type)
+ * @param prc a pointer to a KProcess
+ * @param remove if true the Replay Gain tags are being removed, if false (default) the tags are calculated and added
+ */
+ bool apply( QStringList files, const QString& format, KProcess* proc, int logID, Mode mode = Mode(calc_track|calc_album) ); // NOTE const QStringList& ?
+
+ /*
+ * Returns the track and the album gain (in this order) of the @p file
+ */
+ //static QValueList<float> getReplayGain( QString file ); // obsolete
+
+private:
+ Config* config;
+ Logger* logger;
+};
+
+#endif // REPLAYGAIN_H