1999-08-14 08:06:35 -04:00
|
|
|
// --------------------------------------------------------------------------
|
|
|
|
// Name: sndulaw.h
|
|
|
|
// Purpose:
|
|
|
|
// Date: 08/11/1999
|
|
|
|
// Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999
|
|
|
|
// CVSID: $Id$
|
|
|
|
// --------------------------------------------------------------------------
|
|
|
|
#ifndef _WX_SNDULAW_H
|
|
|
|
#define _WX_SNDULAW_H
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface "sndulaw.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <stddef.h>
|
|
|
|
#include "sndcodec.h"
|
|
|
|
#include "sndbase.h"
|
|
|
|
|
|
|
|
//
|
|
|
|
// ULAW format
|
|
|
|
//
|
|
|
|
class WXDLLEXPORT wxSoundFormatUlaw: public wxSoundFormatBase {
|
|
|
|
public:
|
|
|
|
wxSoundFormatUlaw();
|
|
|
|
~wxSoundFormatUlaw();
|
|
|
|
|
|
|
|
void SetSampleRate(wxUint32 srate);
|
|
|
|
wxUint32 GetSampleRate() const;
|
|
|
|
|
|
|
|
wxSoundFormatType GetType() const { return wxSOUND_ULAW; }
|
|
|
|
wxSoundFormatBase *Clone() const;
|
|
|
|
|
1999-08-15 06:15:05 -04:00
|
|
|
wxUint32 GetTimeFromBytes(wxUint32 bytes) const;
|
|
|
|
wxUint32 GetBytesFromTime(wxUint32 time) const;
|
1999-08-14 08:06:35 -04:00
|
|
|
|
|
|
|
bool operator !=(const wxSoundFormatBase& frmt2) const;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
wxUint32 m_srate;
|
|
|
|
};
|
|
|
|
|
|
|
|
//
|
|
|
|
// ULAW converter class
|
|
|
|
//
|
|
|
|
|
|
|
|
class WXDLLEXPORT wxSoundRouterStream;
|
|
|
|
class WXDLLEXPORT wxSoundStreamUlaw: public wxSoundStreamCodec {
|
|
|
|
public:
|
|
|
|
wxSoundStreamUlaw(wxSoundStream& sndio);
|
|
|
|
~wxSoundStreamUlaw();
|
|
|
|
|
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);
|
|
|
|
|
1999-11-06 12:44:03 -05:00
|
|
|
wxUint32 GetBestSize() const;
|
|
|
|
|
1999-08-14 08:06:35 -04:00
|
|
|
protected:
|
|
|
|
wxSoundRouterStream *m_router;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|