1 // --------------------------------------------------------------------------
5 // Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999
7 // License: wxWindows license
8 // --------------------------------------------------------------------------
13 #pragma interface "sndcpcm.h"
17 #include "wx/mmedia/defs.h"
18 #include "wx/mmedia/sndbase.h"
19 #include "wx/mmedia/sndcodec.h"
22 // PCM converter class
25 class WXDLLIMPEXP_MMEDIA wxSoundStreamPcm
: public wxSoundStreamCodec
{
27 typedef void (*ConverterType
)(const void *buf_in
, void *buf_out
,
30 wxSoundStreamPcm(wxSoundStream
& sndio
);
33 wxSoundStream
& Read(void *buffer
, wxUint32 len
);
34 wxSoundStream
& Write(const void *buffer
, wxUint32 len
);
36 bool SetSoundFormat(const wxSoundFormatBase
& format
);
38 wxUint32
GetBestSize() const;
41 wxUint32
GetReadSize(wxUint32 len
) const;
42 wxUint32
GetWriteSize(wxUint32 len
) const;
45 ConverterType m_function_out
, m_function_in
;
47 // Static temporary buffer
49 wxUint32 m_prebuffer_size
;
50 // Estimated best size to fit into the static buffer
52 // Multiplier for IO buffer size
53 float m_multiplier_in
, m_multiplier_out
;