]> git.saurik.com Git - wxWidgets.git/blame - contrib/include/wx/mmedia/sndcpcm.h
don't define wxUSE_OWNER_DRAWN for wxUniv
[wxWidgets.git] / contrib / include / wx / mmedia / sndcpcm.h
CommitLineData
e8482f24
GL
1// --------------------------------------------------------------------------
2// Name: sndcpcm.h
3// Purpose:
4// Date: 08/11/1999
5// Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999
6// CVSID: $Id$
7// --------------------------------------------------------------------------
8#ifndef _WX_SNDCPCM_H
9#define _WX_SNDCPCM_H
10
11#ifdef __GNUG__
12#pragma interface "sndcpcm.h"
13#endif
14
15#include "wx/defs.h"
16#include "wx/mmedia/sndbase.h"
17#include "wx/mmedia/sndcodec.h"
18
19//
20// PCM converter class
21//
22
c42b1de6 23class WXDLLEXPORT wxSoundStreamPcm: public wxSoundStreamCodec {
e8482f24
GL
24public:
25 typedef void (*ConverterType)(const void *buf_in, void *buf_out,
26 wxUint32 len);
27
28 wxSoundStreamPcm(wxSoundStream& sndio);
29 ~wxSoundStreamPcm();
30
31 wxSoundStream& Read(void *buffer, wxUint32 len);
32 wxSoundStream& Write(const void *buffer, wxUint32 len);
33
34 bool SetSoundFormat(const wxSoundFormatBase& format);
35
36 wxUint32 GetBestSize() const;
37
38protected:
39 wxUint32 GetReadSize(wxUint32 len) const;
40 wxUint32 GetWriteSize(wxUint32 len) const;
41
42protected:
43 ConverterType m_function_out, m_function_in;
44
45 // Static temporary buffer
46 char *m_prebuffer;
47 wxUint32 m_prebuffer_size;
48 // Estimated best size to fit into the static buffer
49 wxUint32 m_best_size;
50 // Multiplier for IO buffer size
51 float m_multiplier_in, m_multiplier_out;
52};
53
54#endif