]> git.saurik.com Git - wxWidgets.git/blob - contrib/include/wx/mmedia/sndwav.h
Split up wxEntry so wxPython can use the bits it needs instead of
[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/sndbase.h"
20 #include "wx/mmedia/sndcodec.h"
21 #include "wx/mmedia/sndfile.h"
22
23 //
24 // WAVE codec
25 //
26
27 class wxSoundWave: public wxSoundFileStream {
28 public:
29 wxSoundWave(wxInputStream& stream, wxSoundStream& io_sound);
30 wxSoundWave(wxOutputStream& stream, wxSoundStream& io_sound);
31 ~wxSoundWave();
32
33 bool CanRead();
34 wxString GetCodecName() const;
35
36 protected:
37 bool PrepareToPlay();
38 bool PrepareToRecord(wxUint32 time);
39 bool FinishRecording();
40 bool RepositionStream(wxUint32 position);
41
42 wxUint32 GetData(void *buffer, wxUint32 len);
43 wxUint32 PutData(const void *buffer, wxUint32 len);
44
45 bool HandleOutputPCM(wxDataInputStream& data, wxUint16 channels,
46 wxUint32 sample_fq, wxUint32 byte_p_sec,
47 wxUint16 byte_p_spl, wxUint16 bits_p_spl);
48 bool HandleOutputG721(wxDataInputStream& data, wxUint16 channels,
49 wxUint32 sample_fq, wxUint32 byte_p_sec,
50 wxUint16 byte_p_spl, wxUint16 bits_p_spl);
51 wxSoundFormatBase *HandleInputPCM(wxDataOutputStream& data);
52 wxSoundFormatBase *HandleInputG72X(wxDataOutputStream& data);
53
54 protected:
55 off_t m_base_offset;
56 };
57
58 #endif