00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef _FM_LOADERAIFF_H_
00013 #define _FM_LOADERAIFF_H_
00014
00015
00016 #include "Loaders.h"
00017 #include <wx/wx.h>
00018
00019
00026 class AIFFLoader : public Loader {
00027 public:
00028 AIFFLoader();
00029 virtual ~AIFFLoader();
00031 static Loader * RegisterLoader();
00033 virtual const wxString & Name() const;
00035 virtual enum status_t Attach(wxFile * file, const wxString & name);
00036 virtual enum status_t Create(wxFile * file, const wxString & name, const format_t & fmt);
00037 virtual enum status_t Create(wxFile * file, const wxString & name, const format_ex_t & fmt);
00038 virtual track_t NumIntTracks() const;
00039 virtual const format_t * TrackFormat(const track_t itrack) const;
00040 virtual const wxString * FileName() const;
00041 virtual length_t GetRawLength() const;
00043 virtual samples_t GetSamples(const track_t itrack, const samples_t pos, const samples_t len, void * data);
00044 virtual samples_t AppendSamples(const track_t itrack, const samples_t len, void * data, samples_t & npos);
00045 virtual samples_t AppendSamples(const samples_t len, void * data);
00046 private:
00047 void done();
00048 enum status_t create_generic(wxFile * file, const wxString & name, const enum encoding_t encoding, const enum samplewidth_t samplewidth, const enum bitencoding_t bitencoding, const samplerate_t rate, const track_t channels, const size_t sample_len);
00050 wxFile * cf;
00051 wxString fname;
00052 format_t format;
00053 track_t tracks;
00054 Datas datas;
00055 };
00056
00057 #endif