]>
git.saurik.com Git - wxWidgets.git/blob - contrib/include/wx/mmedia/sndpcm.h
1 // --------------------------------------------------------------------------
5 // Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999
7 // License: wxWindows license
8 // --------------------------------------------------------------------------
13 #pragma interface "sndpcm.h"
17 #include "wx/mmedia/defs.h"
18 #include "wx/mmedia/sndbase.h"
21 // PCM specification class
24 class wxSoundFormatPcm
: public wxSoundFormatBase
{
26 wxSoundFormatPcm(wxUint32 srate
= 22500, wxUint8 bps
= 8,
27 wxUint16 channels
= 2, bool sign
= true,
28 int order
= wxLITTLE_ENDIAN
);
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
);
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
; }
43 wxSoundFormatType
GetType() const { return wxSOUND_PCM
; }
44 wxSoundFormatBase
*Clone() const;
46 wxUint32
GetTimeFromBytes(wxUint32 bytes
) const;
47 wxUint32
GetBytesFromTime(wxUint32 time
) const;
49 bool operator!=(const wxSoundFormatBase
& frmt2
) const;