]> git.saurik.com Git - wxWidgets.git/blob - utils/wxMMedia2/lib/sndwav.h
some changes to make wxHtmlHelpController easier to subclass
[wxWidgets.git] / utils / wxMMedia2 / lib / 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/stream.h>
17 #include <wx/datstrm.h>
18 #include "sndbase.h"
19 #include "sndcodec.h"
20 #include "sndfile.h"
21
22 //
23 // WAVE codec
24 //
25
26 class wxSoundWave: public wxSoundFileStream {
27 public:
28 wxSoundWave(wxInputStream& stream, wxSoundStream& io_sound);
29 wxSoundWave(wxOutputStream& stream, wxSoundStream& io_sound);
30 ~wxSoundWave();
31
32 bool CanRead();
33
34 protected:
35 bool PrepareToPlay();
36 bool PrepareToRecord(unsigned long time);
37 bool FinishRecording();
38
39 wxUint32 GetData(void *buffer, wxUint32 len);
40 wxUint32 PutData(const void *buffer, wxUint32 len);
41
42 bool HandlePCM(wxDataInputStream& data, wxUint16 channels,
43 wxUint32 sample_fq, wxUint32 byte_p_sec,
44 wxUint16 byte_p_spl, wxUint16 bits_p_spl);
45 bool HandleG721(wxDataInputStream& data, wxUint16 channels,
46 wxUint32 sample_fq, wxUint32 byte_p_sec,
47 wxUint16 byte_p_spl, wxUint16 bits_p_spl);
48 };
49
50 #endif