aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/Input/flac/decoder_flac.h
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2009-09-22 14:30:46 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2009-09-22 14:30:46 +0000
commit362d4e2b4f57a39efeef52a3fd7b5dc432207c0a (patch)
tree0b23c4b433fb7a1f0268dff06292118ed147761b /src/plugins/Input/flac/decoder_flac.h
parente8b40517ef7388747ed07c1a72afa111b8ae64d8 (diff)
downloadqmmp-362d4e2b4f57a39efeef52a3fd7b5dc432207c0a.tar.gz
qmmp-362d4e2b4f57a39efeef52a3fd7b5dc432207c0a.tar.bz2
qmmp-362d4e2b4f57a39efeef52a3fd7b5dc432207c0a.zip
enabled flac plugin
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@1246 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/Input/flac/decoder_flac.h')
-rw-r--r--src/plugins/Input/flac/decoder_flac.h31
1 files changed, 17 insertions, 14 deletions
diff --git a/src/plugins/Input/flac/decoder_flac.h b/src/plugins/Input/flac/decoder_flac.h
index a00860ec4..ea66a652f 100644
--- a/src/plugins/Input/flac/decoder_flac.h
+++ b/src/plugins/Input/flac/decoder_flac.h
@@ -25,9 +25,8 @@
#include <FLAC/all.h>
-#define MAX_SUPPORTED_CHANNELS 2
-
-#define SAMPLES_PER_WRITE 512
+#define MAX_SUPPORTED_CHANNELS 2
+#define SAMPLES_PER_WRITE 512
#define SAMPLE_BUFFER_SIZE ((FLAC__MAX_BLOCK_SIZE + SAMPLES_PER_WRITE) * MAX_SUPPORTED_CHANNELS * (32/8))
class CUEParser;
@@ -60,40 +59,44 @@ struct flac_data
class DecoderFLAC : public Decoder
{
-Q_OBJECT
public:
- DecoderFLAC(QObject *, DecoderFactory *, QIODevice *, Output *, const QString &path);
+ DecoderFLAC(const QString &path, QIODevice *i);
virtual ~DecoderFLAC();
// Standard Decoder API
bool initialize();
qint64 totalTime();
int bitrate();
+ qint64 read(char *data, qint64 maxSize);
+ void seek(qint64 time);
+ const QString nextURL();
+ void next();
struct flac_data *data()
{
return m_data;
}
-private slots:
- void processFinish();
-
private:
- // Standard Decoder API
- qint64 readAudio(char *data, qint64 maxSize);
- void seekAudio(qint64 time);
- struct flac_data *m_data;
// helper functions
void deinit();
// FLAC Decoder
FLAC__StreamDecoder *m_flacDecoder;
+ struct flac_data *m_data;
qint64 m_totalTime;
+ qint64 length_in_bytes;
+ qint64 m_totalBytes;
+ qint64 m_offset;
+ qint64 m_length;
QString m_path;
- CUEParser *m_cue_parser;
- QString m_nextUrl;
+ CUEParser *m_parser;
+ int m_track;
+ char *m_buf; //buffer for remainig data
+ qint64 m_buf_size;
+ qint64 m_sz; //sample size
};