1 // --------------------------------------------------------------------------
5 // Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999
7 // License: wxWindows license
8 // --------------------------------------------------------------------------
13 #pragma interface "sndulaw.h"
17 #include "wx/mmedia/defs.h"
18 #include "wx/mmedia/sndcodec.h"
19 #include "wx/mmedia/sndbase.h"
24 class WXDLLIMPEXP_MMEDIA wxSoundFormatUlaw
: public wxSoundFormatBase
{
29 void SetSampleRate(wxUint32 srate
);
30 wxUint32
GetSampleRate() const;
32 void SetChannels(wxUint8 channels
);
33 wxUint8
GetChannels() const;
35 wxSoundFormatType
GetType() const { return wxSOUND_ULAW
; }
36 wxSoundFormatBase
*Clone() const;
38 wxUint32
GetTimeFromBytes(wxUint32 bytes
) const;
39 wxUint32
GetBytesFromTime(wxUint32 time
) const;
41 bool operator !=(const wxSoundFormatBase
& frmt2
) const;
49 // ULAW converter class
52 class WXDLLIMPEXP_MMEDIA wxSoundRouterStream
;
53 class WXDLLIMPEXP_MMEDIA wxSoundStreamUlaw
: public wxSoundStreamCodec
{
55 wxSoundStreamUlaw(wxSoundStream
& sndio
);
58 wxSoundStream
& Read(void *buffer
, wxUint32 len
);
59 wxSoundStream
& Write(const void *buffer
, wxUint32 len
);
61 bool SetSoundFormat(const wxSoundFormatBase
& format
);
63 wxUint32
GetBestSize() const;
66 wxSoundRouterStream
*m_router
;