]> git.saurik.com Git - wxWidgets.git/blob - contrib/include/wx/mmedia/sndulaw.h
disable use of #pragma interface under Mac OS X
[wxWidgets.git] / contrib / include / wx / mmedia / sndulaw.h
1 // --------------------------------------------------------------------------
2 // Name: sndulaw.h
3 // Purpose:
4 // Date: 08/11/1999
5 // Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999
6 // CVSID: $Id$
7 // --------------------------------------------------------------------------
8 #ifndef _WX_SNDULAW_H
9 #define _WX_SNDULAW_H
10
11 #ifdef __GNUG__
12 #pragma interface "sndulaw.h"
13 #endif
14
15 #include "wx/defs.h"
16 #include "wx/mmedia/sndcodec.h"
17 #include "wx/mmedia/sndbase.h"
18
19 //
20 // ULAW format
21 //
22 class WXDLLEXPORT wxSoundFormatUlaw: public wxSoundFormatBase {
23 public:
24 wxSoundFormatUlaw();
25 ~wxSoundFormatUlaw();
26
27 void SetSampleRate(wxUint32 srate);
28 wxUint32 GetSampleRate() const;
29
30 void SetChannels(wxUint8 channels);
31 wxUint8 GetChannels() const;
32
33 wxSoundFormatType GetType() const { return wxSOUND_ULAW; }
34 wxSoundFormatBase *Clone() const;
35
36 wxUint32 GetTimeFromBytes(wxUint32 bytes) const;
37 wxUint32 GetBytesFromTime(wxUint32 time) const;
38
39 bool operator !=(const wxSoundFormatBase& frmt2) const;
40
41 protected:
42 wxUint32 m_srate;
43 wxUint8 m_channels;
44 };
45
46 //
47 // ULAW converter class
48 //
49
50 class WXDLLEXPORT wxSoundRouterStream;
51 class WXDLLEXPORT wxSoundStreamUlaw: public wxSoundStreamCodec {
52 public:
53 wxSoundStreamUlaw(wxSoundStream& sndio);
54 ~wxSoundStreamUlaw();
55
56 wxSoundStream& Read(void *buffer, wxUint32 len);
57 wxSoundStream& Write(const void *buffer, wxUint32 len);
58
59 bool SetSoundFormat(const wxSoundFormatBase& format);
60
61 wxUint32 GetBestSize() const;
62
63 protected:
64 wxSoundRouterStream *m_router;
65 };
66
67 #endif