]> git.saurik.com Git - wxWidgets.git/blame - contrib/include/wx/mmedia/sndpcm.h
mark slider as being transparent, otherwise it has ugly solid grey background when...
[wxWidgets.git] / contrib / include / wx / mmedia / sndpcm.h
CommitLineData
e8482f24
GL
1// --------------------------------------------------------------------------
2// Name: sndpcm.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_SNDPCM_H
10#define _WX_SNDPCM_H
11
12#ifdef __GNUG__
13#pragma interface "sndpcm.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
20//
21// PCM specification class
22//
23
24class wxSoundFormatPcm : public wxSoundFormatBase {
25public:
26 wxSoundFormatPcm(wxUint32 srate = 22500, wxUint8 bps = 8,
dea7e44a 27 wxUint16 channels = 2, bool sign = true,
e8482f24
GL
28 int order = wxLITTLE_ENDIAN);
29 ~wxSoundFormatPcm();
30
31 void SetSampleRate(wxUint32 srate);
32 void SetBPS(wxUint8 bps);
33 void SetChannels(wxUint16 nchannels);
34 void SetOrder(int order);
35 void Signed(bool sign);
36
37 wxUint32 GetSampleRate() const { return m_srate; }
38 wxUint8 GetBPS() const { return m_bps; }
39 wxUint16 GetChannels() const { return m_nchan; }
40 int GetOrder() const { return m_order; }
41 bool Signed() const { return m_signed; }
42
43 wxSoundFormatType GetType() const { return wxSOUND_PCM; }
44 wxSoundFormatBase *Clone() const;
45
46 wxUint32 GetTimeFromBytes(wxUint32 bytes) const;
47 wxUint32 GetBytesFromTime(wxUint32 time) const;
48
49 bool operator!=(const wxSoundFormatBase& frmt2) const;
50
51protected:
52 wxUint32 m_srate;
53 wxUint8 m_bps;
54 wxUint16 m_nchan;
55 int m_order;
56 bool m_signed;
57};
58
59#endif