1 // --------------------------------------------------------------------------
5 // Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999
7 // --------------------------------------------------------------------------
12 #pragma interface "sndcpcm.h"
19 // PCM converter class
22 class wxSoundStreamPcm
: public wxSoundStreamCodec
{
24 typedef void (*ConverterType
)(const void *buf_in
, void *buf_out
,
27 wxSoundStreamPcm(wxSoundStream
& sndio
);
30 wxSoundStream
& Read(void *buffer
, wxUint32 len
);
31 wxSoundStream
& Write(const void *buffer
, wxUint32 len
);
33 bool SetSoundFormat(const wxSoundFormatBase
& format
);
35 wxUint32
GetBestSize() const;
38 wxUint32
GetReadSize(wxUint32 len
) const;
39 wxUint32
GetWriteSize(wxUint32 len
) const;
42 ConverterType m_function_out
, m_function_in
;
44 // Static temporary buffer
46 wxUint32 m_prebuffer_size
;
47 // Estimated best size to fit into the static buffer
49 // Multiplier for IO buffer size
50 float m_multiplier_in
, m_multiplier_out
;