aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2009-12-13 18:07:51 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2009-12-13 18:07:51 +0000
commitf126808d0f9e5a3d41864ed2d619bde1cafd0a63 (patch)
tree81e8c17c7dfd781a7d8c73c1e01e565090e6782f
parent0910b79d3e3287886d9d0796c2c4c3ed822e97bc (diff)
downloadqmmp-f126808d0f9e5a3d41864ed2d619bde1cafd0a63.tar.gz
qmmp-f126808d0f9e5a3d41864ed2d619bde1cafd0a63.tar.bz2
qmmp-f126808d0f9e5a3d41864ed2d619bde1cafd0a63.zip
fixed build
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@1445 90c681e8-e032-0410-971d-27865f9a5e38
-rw-r--r--src/qmmp/CMakeLists.txt4
-rw-r--r--src/qmmp/qmmp.pro6
-rw-r--r--src/qmmp/qmmpaudioengine.cpp7
-rw-r--r--src/qmmp/qmmpaudioengine.h3
-rw-r--r--src/qmmp/replaygain.cpp2
-rw-r--r--src/qmmp/replaygain.h2
6 files changed, 18 insertions, 6 deletions
diff --git a/src/qmmp/CMakeLists.txt b/src/qmmp/CMakeLists.txt
index 5e8b9f767..46f431954 100644
--- a/src/qmmp/CMakeLists.txt
+++ b/src/qmmp/CMakeLists.txt
@@ -53,6 +53,8 @@ SET(libqmmp_SRCS
fileinputsource.cpp
emptyinputsource.cpp
metadatamanager.cpp
+ replaygain.cpp
+ replaygaininfo.cpp
)
SET(libqmmp_MOC_HDRS
@@ -83,6 +85,8 @@ SET(libqmmp_MOC_HDRS
emptyinputsource.h
enginefactory.h
metadatamanager.h
+ replaygain.h
+ replaygaininfo.h
)
SET(libqmmp_DEVEL_HDRS
diff --git a/src/qmmp/qmmp.pro b/src/qmmp/qmmp.pro
index 638fe71ac..29fe07b3e 100644
--- a/src/qmmp/qmmp.pro
+++ b/src/qmmp/qmmp.pro
@@ -29,7 +29,8 @@ HEADERS += recycler.h \
inputsourcefactory.h \
enginefactory.h \
metadatamanager.h \
- replaygaininfo.h
+ replaygaininfo.h \
+ replaygain.h
SOURCES += recycler.cpp \
decoder.cpp \
output.cpp \
@@ -52,7 +53,8 @@ SOURCES += recycler.cpp \
fileinputsource.cpp \
emptyinputsource.cpp \
metadatamanager.cpp \
- replaygaininfo.cpp
+ replaygaininfo.cpp \
+ replaygain.cpp
FORMS +=
unix:TARGET = ../../lib/qmmp
win32:TARGET = ../../../bin/qmmp
diff --git a/src/qmmp/qmmpaudioengine.cpp b/src/qmmp/qmmpaudioengine.cpp
index 23a0233e3..fd3cb24bd 100644
--- a/src/qmmp/qmmpaudioengine.cpp
+++ b/src/qmmp/qmmpaudioengine.cpp
@@ -21,7 +21,7 @@
#include <QMetaType>
#include <QIODevice>
#include <QFile>
-
+#include "replaygain.h"
#include "effect.h"
#include "buffer.h"
#include "decoder.h"
@@ -51,6 +51,7 @@ QmmpAudioEngine::QmmpAudioEngine(QObject *parent)
m_bks = Buffer::size();
m_decoder = 0;
m_output = 0;
+ m_replayGain = new ReplayGain;
reset();
m_instance = this;
}
@@ -64,6 +65,7 @@ QmmpAudioEngine::~QmmpAudioEngine()
m_output_buf = 0;
qDeleteAll(m_effects);
m_instance = 0;
+ delete m_replayGain;
}
void QmmpAudioEngine::reset()
@@ -305,6 +307,8 @@ qint64 QmmpAudioEngine::produceSound(char *data, qint64 size, quint32 brate, int
{
ulong sz = size < _blksize ? size : _blksize;
+ //m_replayGain->applyReplayGain(data, sz);
+
if (m_useEQ)
{
if (!m_eqInited)
@@ -581,6 +585,7 @@ Output *QmmpAudioEngine::createOutput(Decoder *d)
quint32 srate = m_ap.sampleRate();
int chan = m_ap.channels();
int bps = m_ap.bits();
+ m_replayGain->setSampleSize(bps);
foreach(Effect *effect, m_effects)
{
diff --git a/src/qmmp/qmmpaudioengine.h b/src/qmmp/qmmpaudioengine.h
index 3d0e12e0d..25cef0c4d 100644
--- a/src/qmmp/qmmpaudioengine.h
+++ b/src/qmmp/qmmpaudioengine.h
@@ -34,7 +34,7 @@ class StateHandler;
class Decoder;
class InputSource;
class EffectFactory;
-
+class ReplayGain;
class QmmpAudioEngine : public AbstractEngine
{
@@ -85,6 +85,7 @@ private:
AudioParameters m_ap;
bool m_next;
static QmmpAudioEngine *m_instance;
+ ReplayGain *m_replayGain;
};
diff --git a/src/qmmp/replaygain.cpp b/src/qmmp/replaygain.cpp
index 876797593..c883a38f4 100644
--- a/src/qmmp/replaygain.cpp
+++ b/src/qmmp/replaygain.cpp
@@ -29,7 +29,7 @@ ReplayGain::ReplayGain()
m_scale = 0;
}
-void ReplayGain::configure(quint32 freq, int chan, int bits)
+void ReplayGain::setSampleSize(int bits)
{
m_bits = bits;
}
diff --git a/src/qmmp/replaygain.h b/src/qmmp/replaygain.h
index 67f52243b..ade2e72b4 100644
--- a/src/qmmp/replaygain.h
+++ b/src/qmmp/replaygain.h
@@ -32,7 +32,7 @@ class ReplayGain
public:
ReplayGain();
- void configure(quint32 freq, int chan, int bits);
+ void setSampleSize(int bits);
void setReplayGainInfo(const ReplayGainInfo &info);
void applyReplayGain(char *data, qint64 size);