]>
Commit | Line | Data |
---|---|---|
4d6306eb GL |
1 | // ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: sndaiff.h | |
3 | // Purpose: wxMMedia Aiff Codec | |
4 | // Author: Guilhem Lavaux | |
5 | // Created: 1997 | |
6 | // Updated: February 1998 | |
7 | // Copyright: (C) 1997, 1998, Guilhem Lavaux | |
8 | // License: wxWindows license | |
9 | // ///////////////////////////////////////////////////////////////////////////// | |
10 | /* Real -*- C++ -*- */ | |
11 | #ifndef __SND_aiff_H__ | |
12 | #define __SND_aiff_H__ | |
13 | #ifdef __GNUG__ | |
14 | #pragma interface | |
15 | #endif | |
16 | ||
17 | #include "mmriff.h" | |
18 | #include "sndfile.h" | |
19 | ||
20 | /// | |
21 | class wxSndAiffCodec : public wxSndFileCodec { | |
22 | /// | |
23 | DECLARE_DYNAMIC_CLASS(wxSndAiffCodec) | |
24 | public: | |
25 | /// | |
26 | wxSndAiffCodec(); | |
27 | /// | |
28 | wxSndAiffCodec(wxInputStream& s, bool preload = FALSE, bool seekable = TRUE); | |
29 | /// | |
30 | wxSndAiffCodec(wxOutputStream& s, bool seekable = TRUE); | |
31 | /// | |
32 | wxSndAiffCodec(const wxString& fname); | |
33 | /// | |
34 | virtual ~wxSndAiffCodec(); | |
35 | ||
36 | virtual bool OnNeedData(char *buf, wxUint32 size); | |
37 | virtual bool OnWriteData(char *buf, wxUint32 size); | |
38 | ||
39 | virtual wxUint32 PrepareToPlay(); | |
40 | virtual bool PrepareToRecord(wxUint32 file_size); | |
41 | ||
42 | virtual void SetFile(wxInputStream& s, bool preload = FALSE, | |
43 | bool seekable = FALSE); | |
44 | virtual void SetFile(wxOutputStream& s, | |
45 | bool seekable = FALSE); | |
46 | protected: | |
47 | void ParseCOMM(); | |
48 | void ParseSSND(); | |
49 | ||
50 | void WriteCOMM(); | |
51 | void WriteSSND(wxUint32 file_size); | |
52 | ||
53 | protected: | |
54 | wxUint32 m_spos, m_slen; | |
55 | wxUint32 m_chunksize; | |
56 | }; | |
57 | ||
58 | #endif |