1 // --------------------------------------------------------------------------
5 // Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999
7 // --------------------------------------------------------------------------
12 #pragma interface "sndulaw.h"
16 #include "wx/mmedia/defs.h"
17 #include "wx/mmedia/sndcodec.h"
18 #include "wx/mmedia/sndbase.h"
23 class WXDLLIMPEXP_MMEDIA wxSoundFormatUlaw
: public wxSoundFormatBase
{
28 void SetSampleRate(wxUint32 srate
);
29 wxUint32
GetSampleRate() const;
31 void SetChannels(wxUint8 channels
);
32 wxUint8
GetChannels() const;
34 wxSoundFormatType
GetType() const { return wxSOUND_ULAW
; }
35 wxSoundFormatBase
*Clone() const;
37 wxUint32
GetTimeFromBytes(wxUint32 bytes
) const;
38 wxUint32
GetBytesFromTime(wxUint32 time
) const;
40 bool operator !=(const wxSoundFormatBase
& frmt2
) const;
48 // ULAW converter class
51 class WXDLLIMPEXP_MMEDIA wxSoundRouterStream
;
52 class WXDLLIMPEXP_MMEDIA wxSoundStreamUlaw
: public wxSoundStreamCodec
{
54 wxSoundStreamUlaw(wxSoundStream
& sndio
);
57 wxSoundStream
& Read(void *buffer
, wxUint32 len
);
58 wxSoundStream
& Write(const void *buffer
, wxUint32 len
);
60 bool SetSoundFormat(const wxSoundFormatBase
& format
);
62 wxUint32
GetBestSize() const;
65 wxSoundRouterStream
*m_router
;