00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef _FM_LOADERWAV_H_
00014 #define _FM_LOADERWAV_H_
00015
00016
00017 #include "Loaders.h"
00018 #include <wx/wx.h>
00019
00020
00024 class WAVLoader : public Loader {
00025 public:
00026 WAVLoader();
00027 virtual ~WAVLoader();
00029 static Loader * RegisterLoader();
00031 virtual const wxString & Name() const;
00033 virtual enum status_t Attach(wxFile * file, const wxString & name);
00034 virtual enum status_t Create(wxFile * file, const wxString & name, const format_t & fmt);
00035 virtual enum status_t Create(wxFile * file, const wxString & name, const format_ex_t & fmt);
00036 virtual track_t NumIntTracks() const;
00037 virtual const format_t * TrackFormat(const track_t itrack) const;
00038 virtual const wxString * FileName() const;
00039 virtual length_t GetRawLength() const;
00041 virtual samples_t GetSamples(const track_t itrack, const samples_t pos, const samples_t len, void * data);
00042 virtual samples_t AppendSamples(const track_t itrack, const samples_t len, void * data, samples_t & npos);
00043 virtual samples_t AppendSamples(const samples_t len, void * data);
00044 private:
00045 void done();
00046 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);
00048 wxFile * cf;
00049 wxString fname;
00050 format_t format;
00051 track_t tracks;
00052 Datas datas;
00053 };
00054
00055 #endif