1 // --------------------------------------------------------------------------
5 // Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999
7 // License: wxWindows license
8 // --------------------------------------------------------------------------
13 #include "wx/mmedia/defs.h"
14 #include "wx/mmedia/sndcodec.h"
15 #include "wx/mmedia/sndbase.h"
20 class WXDLLIMPEXP_MMEDIA wxSoundFormatUlaw
: public wxSoundFormatBase
{
25 void SetSampleRate(wxUint32 srate
);
26 wxUint32
GetSampleRate() const;
28 void SetChannels(wxUint8 channels
);
29 wxUint8
GetChannels() const;
31 wxSoundFormatType
GetType() const { return wxSOUND_ULAW
; }
32 wxSoundFormatBase
*Clone() const;
34 wxUint32
GetTimeFromBytes(wxUint32 bytes
) const;
35 wxUint32
GetBytesFromTime(wxUint32 time
) const;
37 bool operator !=(const wxSoundFormatBase
& frmt2
) const;
45 // ULAW converter class
48 class WXDLLIMPEXP_MMEDIA wxSoundRouterStream
;
49 class WXDLLIMPEXP_MMEDIA wxSoundStreamUlaw
: public wxSoundStreamCodec
{
51 wxSoundStreamUlaw(wxSoundStream
& sndio
);
54 wxSoundStream
& Read(void *buffer
, wxUint32 len
);
55 wxSoundStream
& Write(const void *buffer
, wxUint32 len
);
57 bool SetSoundFormat(const wxSoundFormatBase
& format
);
59 wxUint32
GetBestSize() const;
62 wxSoundRouterStream
*m_router
;