40 lines
888 B
C
40 lines
888 B
C
|
#ifndef WAV_FILE_H
|
||
|
#define WAV_FILE_H
|
||
|
|
||
|
#include "gtl_hw_player_file.h"
|
||
|
|
||
|
#include "hw_global.h"
|
||
|
|
||
|
namespace gtl
|
||
|
{
|
||
|
namespace hw
|
||
|
{
|
||
|
class HW_EXPORT player_file_wav : public player_file
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
|
||
|
public:
|
||
|
player_file_wav(QObject *parent, QString path);
|
||
|
~player_file_wav();
|
||
|
|
||
|
virtual bool get_data(qreal *data, int &samples, bool is_cyclic, bool &is_continued);
|
||
|
virtual bool get_data(qreal *data, int &idx, int &samples, bool is_cyclic = false);
|
||
|
|
||
|
private:
|
||
|
quint16 _format;
|
||
|
quint16 _block_align;
|
||
|
quint16 _bits_per_sample;
|
||
|
quint64 _size_data;
|
||
|
|
||
|
private:
|
||
|
void read_fmt_chunk();
|
||
|
void read_data_chunk();
|
||
|
void read_ds64_chunk();
|
||
|
void read_unknown_chunk();
|
||
|
|
||
|
};
|
||
|
}
|
||
|
}
|
||
|
|
||
|
#endif // WAV_FILE_H
|