]> git.saurik.com Git - wxWidgets.git/blame - contrib/include/wx/mmedia/sndcpcm.h
mark slider as being transparent, otherwise it has ugly solid grey background when...
[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$
05aa8cf3 7// License: wxWindows license
e8482f24
GL
8// --------------------------------------------------------------------------
9#ifndef _WX_SNDCPCM_H
10#define _WX_SNDCPCM_H
11
12#ifdef __GNUG__
13#pragma interface "sndcpcm.h"
14#endif
15
16#include "wx/defs.h"
15e8daec 17#include "wx/mmedia/defs.h"
e8482f24
GL
18#include "wx/mmedia/sndbase.h"
19#include "wx/mmedia/sndcodec.h"
20
21//
22// PCM converter class
23//
24
15e8daec 25class WXDLLIMPEXP_MMEDIA wxSoundStreamPcm: public wxSoundStreamCodec {
e8482f24
GL
26public:
27 typedef void (*ConverterType)(const void *buf_in, void *buf_out,
28 wxUint32 len);
29
30 wxSoundStreamPcm(wxSoundStream& sndio);
31 ~wxSoundStreamPcm();
32
33 wxSoundStream& Read(void *buffer, wxUint32 len);
34 wxSoundStream& Write(const void *buffer, wxUint32 len);
35
36 bool SetSoundFormat(const wxSoundFormatBase& format);
37
38 wxUint32 GetBestSize() const;
39
40protected:
41 wxUint32 GetReadSize(wxUint32 len) const;
42 wxUint32 GetWriteSize(wxUint32 len) const;
43
44protected:
45 ConverterType m_function_out, m_function_in;
46
47 // Static temporary buffer
48 char *m_prebuffer;
49 wxUint32 m_prebuffer_size;
50 // Estimated best size to fit into the static buffer
51 wxUint32 m_best_size;
52 // Multiplier for IO buffer size
53 float m_multiplier_in, m_multiplier_out;
54};
55
56#endif