aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/Input/mad
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2008-09-26 19:30:27 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2008-09-26 19:30:27 +0000
commit55c166a5356dff281533ca455cfe633f2721bf17 (patch)
tree445b0ca9344cab165c5fa0b62e090d5d65ee8a64 /src/plugins/Input/mad
parent742e513e91e8d6bd78365bec3da19f13e8cb8519 (diff)
downloadqmmp-55c166a5356dff281533ca455cfe633f2721bf17.tar.gz
qmmp-55c166a5356dff281533ca455cfe633f2721bf17.tar.bz2
qmmp-55c166a5356dff281533ca455cfe633f2721bf17.zip
some api changes; enabled ogg vorbis plugin
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@565 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/Input/mad')
-rw-r--r--src/plugins/Input/mad/decoder_mad.cpp15
-rw-r--r--src/plugins/Input/mad/decoder_mad.h4
2 files changed, 4 insertions, 15 deletions
diff --git a/src/plugins/Input/mad/decoder_mad.cpp b/src/plugins/Input/mad/decoder_mad.cpp
index 395506c33..0eeb912cf 100644
--- a/src/plugins/Input/mad/decoder_mad.cpp
+++ b/src/plugins/Input/mad/decoder_mad.cpp
@@ -102,8 +102,7 @@ bool DecoderMAD::initialize()
{
if (! input()->open(QIODevice::ReadOnly))
{
- /*qWarning("DecoderMAD: Failed to open input. Error " +
- QString::number(input()->isOpen()) + ".");*/
+ qWarning("DecoderMAD: %s", qPrintable(input()->errorString ()));
return FALSE;
}
}
@@ -344,7 +343,7 @@ qint64 DecoderMAD::lengthInSeconds()
return totalTime;
}
-void DecoderMAD::seek(double pos)
+void DecoderMAD::seek(qint64 pos)
{
seekTime = pos;
}
@@ -403,13 +402,8 @@ void DecoderMAD::run()
return;
}
-
- //DecoderState::Type stat = DecoderState::Decoding;
-
mutex()->unlock();
- //dispatch(stat);
-
while (! done && ! m_finish && ! derror)
{
mutex()->lock();
@@ -533,14 +527,9 @@ void DecoderMAD::run()
if (m_finish)
finish();
-// stat = DecoderState::Finished;
- //else if (user_stop)
- // stat = DecoderState::Stopped;
mutex()->unlock();
- //dispatch(stat);
-
if (input())
input()->close();
deinit();
diff --git a/src/plugins/Input/mad/decoder_mad.h b/src/plugins/Input/mad/decoder_mad.h
index 55c662737..7de09b594 100644
--- a/src/plugins/Input/mad/decoder_mad.h
+++ b/src/plugins/Input/mad/decoder_mad.h
@@ -28,7 +28,7 @@ public:
// standard decoder API
bool initialize();
qint64 lengthInSeconds();
- void seek(double);
+ void seek(qint64);
void stop();
private:
@@ -44,7 +44,7 @@ private:
bool findHeader();
bool findXingHeader(struct mad_bitptr, unsigned int);
bool inited, user_stop, done, m_finish, derror, eof, useeq;
- double totalTime, seekTime;
+ qint64 totalTime, seekTime;
int channels;
unsigned long bitrate;
long freq, len;