]> git.saurik.com Git - wxWidgets.git/blob - contrib/include/wx/mmedia/sndwav.h
ported rest of contrib to bakefile
[wxWidgets.git] / contrib / include / wx / mmedia / sndwav.h
1 // --------------------------------------------------------------------------
2 // Name: sndwav.h
3 // Purpose:
4 // Date: 08/11/1999
5 // Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999
6 // CVSID: $Id$
7 // --------------------------------------------------------------------------
8 #ifndef _WX_SNDWAV_H
9 #define _WX_SNDWAV_H
10
11 #ifdef __GNUG__
12 #pragma interface "sndwav.h"
13 #endif
14
15 #include "wx/defs.h"
16 #include "wx/string.h"
17 #include "wx/stream.h"
18 #include "wx/datstrm.h"
19 #include "wx/mmedia/defs.h"
20 #include "wx/mmedia/sndbase.h"
21 #include "wx/mmedia/sndcodec.h"
22 #include "wx/mmedia/sndfile.h"
23
24 //
25 // WAVE codec
26 //
27
28 class wxSoundWave: public wxSoundFileStream {
29 public:
30 wxSoundWave(wxInputStream& stream, wxSoundStream& io_sound);
31 wxSoundWave(wxOutputStream& stream, wxSoundStream& io_sound);
32 ~wxSoundWave();
33
34 bool CanRead();
35 wxString GetCodecName() const;
36
37 protected:
38 bool PrepareToPlay();
39 bool PrepareToRecord(wxUint32 time);
40 bool FinishRecording();
41 bool RepositionStream(wxUint32 position);
42
43 wxUint32 GetData(void *buffer, wxUint32 len);
44 wxUint32 PutData(const void *buffer, wxUint32 len);
45
46 bool HandleOutputPCM(wxDataInputStream& data, wxUint32 len,
47 wxUint16 channels, wxUint32 sample_fq,
48 wxUint32 byte_p_sec, wxUint16 byte_p_spl,
49 wxUint16 bits_p_spl);
50 bool HandleOutputMSADPCM(wxDataInputStream& data, wxUint32 len,
51 wxUint16 channels, wxUint32 sample_fq,
52 wxUint32 byte_p_sec, wxUint16 byte_p_spl,
53 wxUint16 bits_p_spl);
54 bool HandleOutputG721(wxDataInputStream& data, wxUint32 len,
55 wxUint16 channels, wxUint32 sample_fq,
56 wxUint32 byte_p_sec, wxUint16 byte_p_spl,
57 wxUint16 bits_p_spl);
58 wxSoundFormatBase *HandleInputPCM(wxDataOutputStream& data);
59 wxSoundFormatBase *HandleInputG72X(wxDataOutputStream& data);
60
61 protected:
62 off_t m_base_offset;
63 };
64
65 #endif