1999-08-14 08:06:35 -04:00
|
|
|
// --------------------------------------------------------------------------
|
|
|
|
// Name: sndcpcm.h
|
|
|
|
// Purpose:
|
|
|
|
// Date: 08/11/1999
|
|
|
|
// Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999
|
|
|
|
// CVSID: $Id$
|
|
|
|
// --------------------------------------------------------------------------
|
|
|
|
#ifndef _WX_SNDCPCM_H
|
|
|
|
#define _WX_SNDCPCM_H
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface "sndcpcm.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <stddef.h>
|
|
|
|
#include "sndcodec.h"
|
|
|
|
|
|
|
|
//
|
|
|
|
// PCM converter class
|
|
|
|
//
|
|
|
|
|
|
|
|
class wxSoundStreamPcm: public wxSoundStreamCodec {
|
|
|
|
public:
|
1999-08-27 13:40:40 -04:00
|
|
|
typedef void (*ConverterType)(const char *buf_in, char *buf_out, wxUint32 len);
|
1999-08-14 08:06:35 -04:00
|
|
|
|
|
|
|
wxSoundStreamPcm(wxSoundStream& sndio);
|
|
|
|
~wxSoundStreamPcm();
|
|
|
|
|
1999-08-27 13:40:40 -04:00
|
|
|
wxSoundStream& Read(void *buffer, wxUint32 len);
|
|
|
|
wxSoundStream& Write(const void *buffer, wxUint32 len);
|
1999-08-14 08:06:35 -04:00
|
|
|
|
|
|
|
bool SetSoundFormat(const wxSoundFormatBase& format);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
ConverterType m_function_out, m_function_in;
|
|
|
|
|
|
|
|
bool m_16_to_8;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|