]>
git.saurik.com Git - wxWidgets.git/blob - utils/wxMMedia2/lib/sndpcm.h
1 // --------------------------------------------------------------------------
5 // Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999
7 // --------------------------------------------------------------------------
12 #pragma interface "sndpcm.h"
19 // PCM specification class
22 class wxSoundFormatPcm
: public wxSoundFormatBase
{
24 wxSoundFormatPcm(wxUint32 srate
= 22500, wxUint8 bps
= 8,
25 wxUint16 channels
= 2, bool sign
= TRUE
,
26 int order
= wxLITTLE_ENDIAN
);
29 void SetSampleRate(wxUint32 srate
);
30 void SetBPS(wxUint8 bps
);
31 void SetChannels(wxUint16 nchannels
);
32 void SetOrder(int order
);
33 void Signed(bool sign
);
35 wxUint32
GetSampleRate() const { return m_srate
; }
36 wxUint8
GetBPS() const { return m_bps
; }
37 wxUint16
GetChannels() const { return m_nchan
; }
38 int GetOrder() const { return m_order
; }
39 bool Signed() const { return m_signed
; }
41 wxSoundFormatType
GetType() const { return wxSOUND_PCM
; }
42 wxSoundFormatBase
*Clone() const;
44 wxUint32
GetTimeFromBytes(wxUint32 bytes
) const;
45 wxUint32
GetBytesFromTime(wxUint32 time
) const;
47 bool operator!=(const wxSoundFormatBase
& frmt2
) const;