]> git.saurik.com Git - wxWidgets.git/blame - contrib/include/wx/mmedia/sndpcm.h
Include wx/dialog.h according to precompiled headers of wx/wx.h (with other minor...
[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
e8482f24 12#include "wx/defs.h"
15e8daec 13#include "wx/mmedia/defs.h"
e8482f24
GL
14#include "wx/mmedia/sndbase.h"
15
16//
17// PCM specification class
18//
19
20class wxSoundFormatPcm : public wxSoundFormatBase {
21public:
22 wxSoundFormatPcm(wxUint32 srate = 22500, wxUint8 bps = 8,
dea7e44a 23 wxUint16 channels = 2, bool sign = true,
e8482f24
GL
24 int order = wxLITTLE_ENDIAN);
25 ~wxSoundFormatPcm();
26
27 void SetSampleRate(wxUint32 srate);
28 void SetBPS(wxUint8 bps);
29 void SetChannels(wxUint16 nchannels);
30 void SetOrder(int order);
31 void Signed(bool sign);
32
33 wxUint32 GetSampleRate() const { return m_srate; }
34 wxUint8 GetBPS() const { return m_bps; }
35 wxUint16 GetChannels() const { return m_nchan; }
36 int GetOrder() const { return m_order; }
37 bool Signed() const { return m_signed; }
38
39 wxSoundFormatType GetType() const { return wxSOUND_PCM; }
40 wxSoundFormatBase *Clone() const;
41
42 wxUint32 GetTimeFromBytes(wxUint32 bytes) const;
43 wxUint32 GetBytesFromTime(wxUint32 time) const;
44
45 bool operator!=(const wxSoundFormatBase& frmt2) const;
46
47protected:
48 wxUint32 m_srate;
49 wxUint8 m_bps;
50 wxUint16 m_nchan;
51 int m_order;
52 bool m_signed;
53};
54
55#endif