1 // --------------------------------------------------------------------------
5 // Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999
7 // --------------------------------------------------------------------------
12 #pragma interface "sndcpcm.h"
16 #include "wx/mmedia/sndbase.h"
17 #include "wx/mmedia/sndcodec.h"
20 // PCM converter class
23 class WXDLLEXPORT wxSoundStreamPcm
: public wxSoundStreamCodec
{
25 typedef void (*ConverterType
)(const void *buf_in
, void *buf_out
,
28 wxSoundStreamPcm(wxSoundStream
& sndio
);
31 wxSoundStream
& Read(void *buffer
, wxUint32 len
);
32 wxSoundStream
& Write(const void *buffer
, wxUint32 len
);
34 bool SetSoundFormat(const wxSoundFormatBase
& format
);
36 wxUint32
GetBestSize() const;
39 wxUint32
GetReadSize(wxUint32 len
) const;
40 wxUint32
GetWriteSize(wxUint32 len
) const;
43 ConverterType m_function_out
, m_function_in
;
45 // Static temporary buffer
47 wxUint32 m_prebuffer_size
;
48 // Estimated best size to fit into the static buffer
50 // Multiplier for IO buffer size
51 float m_multiplier_in
, m_multiplier_out
;