]> git.saurik.com Git - wxWidgets.git/blob - utils/wxMMedia2/lib/sndulaw.h
makefile typo
[wxWidgets.git] / utils / wxMMedia2 / lib / 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 <stddef.h>
16 #include "sndcodec.h"
17 #include "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 wxSoundFormatType GetType() const { return wxSOUND_ULAW; }
31 wxSoundFormatBase *Clone() const;
32
33 wxUint32 GetTimeFromBytes(wxUint32 bytes) const;
34 wxUint32 GetBytesFromTime(wxUint32 time) const;
35
36 bool operator !=(const wxSoundFormatBase& frmt2) const;
37
38 protected:
39 wxUint32 m_srate;
40 };
41
42 //
43 // ULAW converter class
44 //
45
46 class WXDLLEXPORT wxSoundRouterStream;
47 class WXDLLEXPORT wxSoundStreamUlaw: public wxSoundStreamCodec {
48 public:
49 wxSoundStreamUlaw(wxSoundStream& sndio);
50 ~wxSoundStreamUlaw();
51
52 wxSoundStream& Read(void *buffer, size_t len);
53 wxSoundStream& Write(const void *buffer, size_t len);
54
55 bool SetSoundFormat(const wxSoundFormatBase& format);
56
57 protected:
58 wxSoundRouterStream *m_router;
59 };
60
61 #endif