]> git.saurik.com Git - wxWidgets.git/blame - contrib/include/wx/mmedia/sndulaw.h
Added event Clone functions
[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"
16#include "wx/mmedia/sndcodec.h"
17#include "wx/mmedia/sndbase.h"
18
19//
20// ULAW format
21//
22class WXDLLEXPORT wxSoundFormatUlaw: public wxSoundFormatBase {
23public:
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
41protected:
42 wxUint32 m_srate;
43 wxUint8 m_channels;
44};
45
46//
47// ULAW converter class
48//
49
50class WXDLLEXPORT wxSoundRouterStream;
51class WXDLLEXPORT wxSoundStreamUlaw: public wxSoundStreamCodec {
52public:
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
63protected:
64 wxSoundRouterStream *m_router;
65};
66
67#endif