1999-08-14 12:06:35 +00:00
|
|
|
// --------------------------------------------------------------------------
|
|
|
|
// Name: sndwav.h
|
|
|
|
// Purpose:
|
|
|
|
// Date: 08/11/1999
|
|
|
|
// Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999
|
|
|
|
// CVSID: $Id$
|
|
|
|
// --------------------------------------------------------------------------
|
|
|
|
#ifndef _WX_SNDWAV_H
|
|
|
|
#define _WX_SNDWAV_H
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface "sndwav.h"
|
|
|
|
#endif
|
|
|
|
|
1999-08-27 17:40:40 +00:00
|
|
|
#include <wx/defs.h>
|
1999-08-14 12:06:35 +00:00
|
|
|
#include <wx/stream.h>
|
1999-08-27 17:40:40 +00:00
|
|
|
#include <wx/datstrm.h>
|
1999-08-14 12:06:35 +00:00
|
|
|
#include "sndbase.h"
|
|
|
|
#include "sndcodec.h"
|
|
|
|
#include "sndfile.h"
|
|
|
|
|
|
|
|
//
|
|
|
|
// WAVE codec
|
|
|
|
//
|
|
|
|
|
|
|
|
class wxSoundWave: public wxSoundFileStream {
|
|
|
|
public:
|
|
|
|
wxSoundWave(wxInputStream& stream, wxSoundStream& io_sound);
|
|
|
|
wxSoundWave(wxOutputStream& stream, wxSoundStream& io_sound);
|
|
|
|
~wxSoundWave();
|
|
|
|
|
|
|
|
bool CanRead();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
bool PrepareToPlay();
|
|
|
|
bool PrepareToRecord(unsigned long time);
|
|
|
|
bool FinishRecording();
|
|
|
|
|
1999-08-27 17:40:40 +00:00
|
|
|
wxUint32 GetData(void *buffer, wxUint32 len);
|
|
|
|
wxUint32 PutData(const void *buffer, wxUint32 len);
|
|
|
|
|
1999-09-05 05:51:05 +00:00
|
|
|
bool HandleOutputPCM(wxDataInputStream& data, wxUint16 channels,
|
1999-08-27 17:40:40 +00:00
|
|
|
wxUint32 sample_fq, wxUint32 byte_p_sec,
|
|
|
|
wxUint16 byte_p_spl, wxUint16 bits_p_spl);
|
1999-09-05 05:51:05 +00:00
|
|
|
bool HandleOutputG721(wxDataInputStream& data, wxUint16 channels,
|
1999-08-27 17:40:40 +00:00
|
|
|
wxUint32 sample_fq, wxUint32 byte_p_sec,
|
|
|
|
wxUint16 byte_p_spl, wxUint16 bits_p_spl);
|
1999-09-05 05:51:05 +00:00
|
|
|
wxSoundFormatBase *HandleInputPCM(wxDataOutputStream& data);
|
|
|
|
wxSoundFormatBase *HandleInputG72X(wxDataOutputStream& data);
|
1999-08-14 12:06:35 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|