]> git.saurik.com Git - wxWidgets.git/blob - utils/wxMMedia/sndpcm.h
handle sizeof(int) correctly
[wxWidgets.git] / utils / wxMMedia / sndpcm.h
1 #ifndef __SNDPCM_H__
2 #define __SNDPCM_H__
3
4 #ifdef __GNUG__
5 #pragma interface
6 #endif
7
8 #include "sndfrmt.h"
9
10 class wxSoundPcmCodec : public wxSoundCodec {
11 DECLARE_DYNAMIC_CLASS(wxSoundPcmCodec)
12 public:
13 wxSoundPcmCodec();
14 virtual ~wxSoundPcmCodec();
15
16 void SetSampleRate(int srate) { m_orig_format.SetSampleRate(srate); }
17 void SetBits(int bits) { m_orig_format.SetBps(bits); }
18 void SetByteOrder(int order) { m_orig_format.SetByteOrder(order); }
19 void SetSign(int sample_sign) { m_orig_format.SetSign(sample_sign); }
20
21 size_t GetByteRate() const;
22 wxSoundDataFormat GetPreferredFormat(int codec = 0) const;
23
24 void Decode();
25 void Encode();
26
27 protected:
28 void InputSign8();
29 void InputSwapAndSign16();
30 void OutputSign8();
31 void OutputSwapAndSign16();
32
33 protected:
34 wxSoundDataFormat m_orig_format;
35 char m_char_stack;
36 bool m_char_bool;
37 };
38
39 #endif