aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/Input/flac/decoder_flac.h
diff options
context:
space:
mode:
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
};