]> git.saurik.com Git - wxWidgets.git/blame - utils/wxMMedia2/lib/sndulaw.h
added support for several new events in wxCalendarCtrl: clicking on week
[wxWidgets.git] / utils / wxMMedia2 / lib / sndulaw.h
CommitLineData
526ddb13
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 <stddef.h>
16#include "sndcodec.h"
17#include "sndbase.h"
18
19//
20// ULAW format
21//
22class 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
622e48cb
GL
33 wxUint32 GetTimeFromBytes(wxUint32 bytes) const;
34 wxUint32 GetBytesFromTime(wxUint32 time) const;
526ddb13
GL
35
36 bool operator !=(const wxSoundFormatBase& frmt2) const;
37
38 protected:
39 wxUint32 m_srate;
40};
41
42//
43// ULAW converter class
44//
45
46class WXDLLEXPORT wxSoundRouterStream;
47class WXDLLEXPORT wxSoundStreamUlaw: public wxSoundStreamCodec {
48 public:
49 wxSoundStreamUlaw(wxSoundStream& sndio);
50 ~wxSoundStreamUlaw();
51
0662cd32
GL
52 wxSoundStream& Read(void *buffer, wxUint32 len);
53 wxSoundStream& Write(const void *buffer, wxUint32 len);
526ddb13
GL
54
55 bool SetSoundFormat(const wxSoundFormatBase& format);
56
56dc1ffd
GL
57 wxUint32 GetBestSize() const;
58
526ddb13
GL
59 protected:
60 wxSoundRouterStream *m_router;
61};
62
63#endif