]> git.saurik.com Git - wxWidgets.git/blame - contrib/include/wx/mmedia/sndulaw.h
setter by ref for
[wxWidgets.git] / contrib / include / wx / mmedia / sndulaw.h
CommitLineData
e8482f24
GL
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"
15e8daec 16#include "wx/mmedia/defs.h"
e8482f24
GL
17#include "wx/mmedia/sndcodec.h"
18#include "wx/mmedia/sndbase.h"
19
20//
21// ULAW format
22//
15e8daec 23class WXDLLIMPEXP_MMEDIA wxSoundFormatUlaw: public wxSoundFormatBase {
e8482f24
GL
24public:
25 wxSoundFormatUlaw();
26 ~wxSoundFormatUlaw();
27
28 void SetSampleRate(wxUint32 srate);
29 wxUint32 GetSampleRate() const;
30
31 void SetChannels(wxUint8 channels);
32 wxUint8 GetChannels() const;
33
34 wxSoundFormatType GetType() const { return wxSOUND_ULAW; }
35 wxSoundFormatBase *Clone() const;
36
37 wxUint32 GetTimeFromBytes(wxUint32 bytes) const;
38 wxUint32 GetBytesFromTime(wxUint32 time) const;
39
40 bool operator !=(const wxSoundFormatBase& frmt2) const;
41
42protected:
43 wxUint32 m_srate;
44 wxUint8 m_channels;
45};
46
47//
48// ULAW converter class
49//
50
15e8daec
VS
51class WXDLLIMPEXP_MMEDIA wxSoundRouterStream;
52class WXDLLIMPEXP_MMEDIA wxSoundStreamUlaw: public wxSoundStreamCodec {
e8482f24
GL
53public:
54 wxSoundStreamUlaw(wxSoundStream& sndio);
55 ~wxSoundStreamUlaw();
56
57 wxSoundStream& Read(void *buffer, wxUint32 len);
58 wxSoundStream& Write(const void *buffer, wxUint32 len);
59
60 bool SetSoundFormat(const wxSoundFormatBase& format);
61
62 wxUint32 GetBestSize() const;
63
64protected:
65 wxSoundRouterStream *m_router;
66};
67
68#endif