1 // --------------------------------------------------------------------------
5 // Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999
7 // --------------------------------------------------------------------------
12 #pragma interface "sndulaw.h"
16 #include "wx/mmedia/sndcodec.h"
17 #include "wx/mmedia/sndbase.h"
22 class WXDLLEXPORT wxSoundFormatUlaw
: public wxSoundFormatBase
{
27 void SetSampleRate(wxUint32 srate
);
28 wxUint32
GetSampleRate() const;
30 void SetChannels(wxUint8 channels
);
31 wxUint8
GetChannels() const;
33 wxSoundFormatType
GetType() const { return wxSOUND_ULAW
; }
34 wxSoundFormatBase
*Clone() const;
36 wxUint32
GetTimeFromBytes(wxUint32 bytes
) const;
37 wxUint32
GetBytesFromTime(wxUint32 time
) const;
39 bool operator !=(const wxSoundFormatBase
& frmt2
) const;
47 // ULAW converter class
50 class WXDLLEXPORT wxSoundRouterStream
;
51 class WXDLLEXPORT wxSoundStreamUlaw
: public wxSoundStreamCodec
{
53 wxSoundStreamUlaw(wxSoundStream
& sndio
);
56 wxSoundStream
& Read(void *buffer
, wxUint32 len
);
57 wxSoundStream
& Write(const void *buffer
, wxUint32 len
);
59 bool SetSoundFormat(const wxSoundFormatBase
& format
);
61 wxUint32
GetBestSize() const;
64 wxSoundRouterStream
*m_router
;