1 // --------------------------------------------------------------------------
5 // Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999
7 // License: wxWindows license
8 // --------------------------------------------------------------------------
13 #include "wx/mmedia/defs.h"
14 #include "wx/mmedia/sndbase.h"
15 #include "wx/mmedia/sndcodec.h"
18 // PCM converter class
21 class WXDLLIMPEXP_MMEDIA wxSoundStreamPcm
: public wxSoundStreamCodec
{
23 typedef void (*ConverterType
)(const void *buf_in
, void *buf_out
,
26 wxSoundStreamPcm(wxSoundStream
& sndio
);
29 wxSoundStream
& Read(void *buffer
, wxUint32 len
);
30 wxSoundStream
& Write(const void *buffer
, wxUint32 len
);
32 bool SetSoundFormat(const wxSoundFormatBase
& format
);
34 wxUint32
GetBestSize() const;
37 wxUint32
GetReadSize(wxUint32 len
) const;
38 wxUint32
GetWriteSize(wxUint32 len
) const;
41 ConverterType m_function_out
, m_function_in
;
43 // Static temporary buffer
45 wxUint32 m_prebuffer_size
;
46 // Estimated best size to fit into the static buffer
48 // Multiplier for IO buffer size
49 float m_multiplier_in
, m_multiplier_out
;