]> git.saurik.com Git - wxWidgets.git/blob - contrib/include/wx/mmedia/sndmsad.h
Added WXDLLEXPORT symbol for DynLib classes
[wxWidgets.git] / contrib / include / wx / mmedia / sndmsad.h
1 // --------------------------------------------------------------------------
2 // Name: sndmsad(pcm).h
3 // Purpose: MS ADPCM codec
4 // Date: 25/02/2000
5 // Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 2000
6 // CVSID: $Id$
7 // --------------------------------------------------------------------------
8 #ifndef _WX_SNDULAW_H
9 #define _WX_SNDULAW_H
10
11 #ifdef __GNUG__
12 #pragma interface "sndmsad.h"
13 #endif
14
15 #include "wx/defs.h"
16 #include "wx/dynarray.h"
17 #include "wx/mmedia/sndcodec.h"
18 #include "wx/mmedia/sndbase.h"
19
20 WX_DEFINE_EXPORTED_ARRAY(wxUint16, wxMSAdpcmCoeffs);
21
22 //
23 // MSADPCM format
24 //
25 class WXDLLEXPORT wxSoundFormatMSAdpcm: public wxSoundFormatBase {
26 public:
27 wxSoundFormatMSAdpcm();
28 ~wxSoundFormatMSAdpcm();
29
30 void SetSampleRate(wxUint32 srate);
31 wxUint32 GetSampleRate() const;
32
33 void SetSamplesBlock(wxUint16 sampblock);
34 wxUint16 GetSamplesBlock() const;
35
36 void SetCoefs(wxMSAdpcmCoefs& coefs);
37 wxMSAdpcmCoefs& GetCoefs() const;
38
39 wxSoundFormatType GetType() const { return wxSOUND_ULAW; }
40 wxSoundFormatBase *Clone() const;
41
42 wxUint32 GetTimeFromBytes(wxUint32 bytes) const;
43 wxUint32 GetBytesFromTime(wxUint32 time) const;
44
45 bool operator !=(const wxSoundFormatBase& frmt2) const;
46
47 protected:
48 wxUint32 m_srate;
49 wxMSAdpcmCoefs *m_coefs;
50 };
51
52 //
53 // MS ADPCM converter class
54 //
55 class WXDLLEXPORT wxSoundRouterStream;
56 class WXDLLEXPORT wxSoundStreamAdpcm: public wxSoundStreamCodec {
57 public:
58 wxSoundStreamAdpcm(wxSoundStream& sndio);
59 ~wxSoundStreamAdpcm();
60
61 wxSoundStream& Read(void *buffer, wxUint32 len);
62 wxSoundStream& Write(const void *buffer, wxUint32 len);
63
64 bool SetSoundFormat(const wxSoundFormatBase& format);
65
66 wxUint32 GetBestSize() const;
67
68 protected:
69 wxSoundRouterStream *m_router;
70 };
71
72 #endif