diff options
Diffstat (limited to 'src/plugins/Input/mpc')
| -rw-r--r-- | src/plugins/Input/mpc/decoder_mpc.cpp | 16 | ||||
| -rw-r--r-- | src/plugins/Input/mpc/decoder_mpc.h | 6 |
2 files changed, 9 insertions, 13 deletions
diff --git a/src/plugins/Input/mpc/decoder_mpc.cpp b/src/plugins/Input/mpc/decoder_mpc.cpp index 9b3679dd3..d8d739c1c 100644 --- a/src/plugins/Input/mpc/decoder_mpc.cpp +++ b/src/plugins/Input/mpc/decoder_mpc.cpp @@ -112,14 +112,10 @@ DecoderMPC::DecoderMPC(QObject *parent, DecoderFactory *d, QIODevice *i, Output freq = 0; bitrate = 0; seekTime = -1.0; - totalTime = 0.0; + m_totalTime = 0.0; chan = 0; output_size = 0; m_data = 0; - - - - } @@ -191,7 +187,7 @@ bool DecoderMPC::initialize() chan = 0; output_size = 0; seekTime = -1.0; - totalTime = 0.0; + m_totalTime = 0.0; if (!input()) @@ -242,19 +238,19 @@ bool DecoderMPC::initialize() qWarning("DecoderMPC: cannot get info."); return FALSE; } - totalTime = mpc_streaminfo_get_length(&data()->info); + m_totalTime = mpc_streaminfo_get_length(&data()->info) * 1000; inited = TRUE; qDebug("DecoderMPC: initialize succes"); return TRUE; } -qint64 DecoderMPC::lengthInSeconds() +qint64 DecoderMPC::totalTime() { if (! inited) return 0; - return totalTime; + return m_totalTime; } @@ -292,7 +288,7 @@ void DecoderMPC::run() if (seekTime >= 0.0) { - mpc_decoder_seek_seconds(&data()->decoder, seekTime); + mpc_decoder_seek_seconds(&data()->decoder, seekTime/1000); seekTime = -1.0; } MPC_SAMPLE_FORMAT buffer[MPC_DECODER_BUFFER_LENGTH]; diff --git a/src/plugins/Input/mpc/decoder_mpc.h b/src/plugins/Input/mpc/decoder_mpc.h index 733fcd8ca..052f634c8 100644 --- a/src/plugins/Input/mpc/decoder_mpc.h +++ b/src/plugins/Input/mpc/decoder_mpc.h @@ -40,7 +40,7 @@ public: // Standard Decoder API bool initialize(); - qint64 lengthInSeconds(); + qint64 totalTime(); void seek(qint64); void stop(); @@ -68,8 +68,8 @@ private: bool done, m_finish; long len, freq, bitrate; int chan; - unsigned long output_size; - qint64 totalTime, seekTime; + qint64 output_size; + qint64 m_totalTime, seekTime; }; |
