1 // --------------------------------------------------------------------------
5 // Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999
7 // --------------------------------------------------------------------------
12 #pragma interface "sndcpcm.h"
16 #include "wx/mmedia/defs.h"
17 #include "wx/mmedia/sndbase.h"
18 #include "wx/mmedia/sndcodec.h"
21 // PCM converter class
24 class WXDLLIMPEXP_MMEDIA wxSoundStreamPcm
: public wxSoundStreamCodec
{
26 typedef void (*ConverterType
)(const void *buf_in
, void *buf_out
,
29 wxSoundStreamPcm(wxSoundStream
& sndio
);
32 wxSoundStream
& Read(void *buffer
, wxUint32 len
);
33 wxSoundStream
& Write(const void *buffer
, wxUint32 len
);
35 bool SetSoundFormat(const wxSoundFormatBase
& format
);
37 wxUint32
GetBestSize() const;
40 wxUint32
GetReadSize(wxUint32 len
) const;
41 wxUint32
GetWriteSize(wxUint32 len
) const;
44 ConverterType m_function_out
, m_function_in
;
46 // Static temporary buffer
48 wxUint32 m_prebuffer_size
;
49 // Estimated best size to fit into the static buffer
51 // Multiplier for IO buffer size
52 float m_multiplier_in
, m_multiplier_out
;