]> git.saurik.com Git - wxWidgets.git/blame - contrib/include/wx/mmedia/sndulaw.h
mark slider as being transparent, otherwise it has ugly solid grey background when...
[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$
05aa8cf3 7// License: wxWindows license
e8482f24
GL
8// --------------------------------------------------------------------------
9#ifndef _WX_SNDULAW_H
10#define _WX_SNDULAW_H
11
12#ifdef __GNUG__
13#pragma interface "sndulaw.h"
14#endif
15
16#include "wx/defs.h"
15e8daec 17#include "wx/mmedia/defs.h"
e8482f24
GL
18#include "wx/mmedia/sndcodec.h"
19#include "wx/mmedia/sndbase.h"
20
21//
22// ULAW format
23//
15e8daec 24class WXDLLIMPEXP_MMEDIA wxSoundFormatUlaw: public wxSoundFormatBase {
e8482f24
GL
25public:
26 wxSoundFormatUlaw();
27 ~wxSoundFormatUlaw();
28
29 void SetSampleRate(wxUint32 srate);
30 wxUint32 GetSampleRate() const;
31
32 void SetChannels(wxUint8 channels);
33 wxUint8 GetChannels() const;
34
35 wxSoundFormatType GetType() const { return wxSOUND_ULAW; }
36 wxSoundFormatBase *Clone() const;
37
38 wxUint32 GetTimeFromBytes(wxUint32 bytes) const;
39 wxUint32 GetBytesFromTime(wxUint32 time) const;
40
41 bool operator !=(const wxSoundFormatBase& frmt2) const;
42
43protected:
44 wxUint32 m_srate;
45 wxUint8 m_channels;
46};
47
48//
49// ULAW converter class
50//
51
15e8daec
VS
52class WXDLLIMPEXP_MMEDIA wxSoundRouterStream;
53class WXDLLIMPEXP_MMEDIA wxSoundStreamUlaw: public wxSoundStreamCodec {
e8482f24
GL
54public:
55 wxSoundStreamUlaw(wxSoundStream& sndio);
56 ~wxSoundStreamUlaw();
57
58 wxSoundStream& Read(void *buffer, wxUint32 len);
59 wxSoundStream& Write(const void *buffer, wxUint32 len);
60
61 bool SetSoundFormat(const wxSoundFormatBase& format);
62
63 wxUint32 GetBestSize() const;
64
65protected:
66 wxSoundRouterStream *m_router;
67};
68
69#endif