]>
git.saurik.com Git - wxWidgets.git/blob - utils/wxMMedia/mmriff.h
1 // /////////////////////////////////////////////////////////////////////////////
4 // Author: Guilhem Lavaux
7 // Copyright: (C) 1998, Guilhem Lavaux
8 // License: wxWindows license
9 // /////////////////////////////////////////////////////////////////////////////
10 /* Real -*- C++ -*- */
22 #define INVALID_CHUNK_LEN ((wxUint32)-1)
30 wxRiffCodec(wxOutputStream
& s
);
32 wxRiffCodec(wxInputStream
& s
);
34 virtual ~wxRiffCodec();
37 void SetFile(wxInputStream
& s
) { cout
<< "RIFF:SetFile(i)" << endl
; riff_i_stream
= &s
; riff_o_stream
= NULL
; }
39 void SetFile(wxOutputStream
& s
) { cout
<< "RIFF::SetFile(o)" << endl
; riff_i_stream
= NULL
; riff_o_stream
= &s
; }
42 bool Read32(wxUint32
& i32
);
44 bool Read16(wxUint16
& i16
);
46 bool ReadData(void *data
, wxUint32 size
);
48 bool Skip(wxUint32 skip
);
51 bool Write32(wxUint32 i32
);
53 bool Write16(wxUint16 i16
);
55 bool WriteData(void *data
, wxUint32 size
);
58 inline wxUint32
GetChunkLength() const { return chunk_length
; }
60 inline const wxString
& GetChunkName() const { return m_chunk
; }
63 bool RiffReset(wxUint8 state
);
66 bool FindChunk(const wxString
& name
= "", bool from_here
= FALSE
);
68 bool CreateChunk(const wxString
& name
, wxUint32 chunk_size
);
71 inline wxMMFileError
GetError() const { return riff_error
; }
74 wxInputStream
*riff_i_stream
;
75 wxOutputStream
*riff_o_stream
;
76 wxUint32 chunk_length
;
77 wxMMFileError riff_error
;