wxWidgets/utils/wxMMedia/sndpcm.h
Guilhem Lavaux 4d6306eb4d * Added wxMMedia in the repository so people interrested in it can work on it
* WARNING! It is quite unstable on Windows and it doesn't work on Linux for
  the moment because I didn't finish fixing the CODEC stream.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@975 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-11-09 18:37:38 +00:00

40 lines
868 B
C++

#ifndef __SNDPCM_H__
#define __SNDPCM_H__
#ifdef __GNUG__
#pragma interface
#endif
#include "sndfrmt.h"
class wxSoundPcmCodec : public wxSoundCodec {
DECLARE_DYNAMIC_CLASS(wxSoundPcmCodec)
public:
wxSoundPcmCodec();
virtual ~wxSoundPcmCodec();
void SetSampleRate(int srate) { m_orig_format.SetSampleRate(srate); }
void SetBits(int bits) { m_orig_format.SetBps(bits); }
void SetByteOrder(int order) { m_orig_format.SetByteOrder(order); }
void SetSign(int sample_sign) { m_orig_format.SetSign(sample_sign); }
size_t GetByteRate() const;
wxSoundDataFormat GetPreferredFormat(int codec = 0) const;
void Decode();
void Encode();
protected:
void InputSign8();
void InputSwapAndSign16();
void OutputSign8();
void OutputSwapAndSign16();
protected:
wxSoundDataFormat m_orig_format;
char m_char_stack;
bool m_char_bool;
};
#endif