Source

h323ac / wavchan.h

Full commit
/***************************************************************************
    wavchan.h

    Copyright (c) 2002-2003  Vladimir Toncar

    The contents of this file are subject to the Mozilla Public License
    Version 1.1 (the "License"); you may not use this file except in
    compliance with the License. You may obtain a copy of the License at
    http://www.mozilla.org/MPL/

    Software distributed under the License is distributed on an "AS IS"
    basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.
    See the License for the specific language governing rights and
    limitations under the License.

    The Original Code is oh323tut.

    The Initial Developer of the Original Code is Vladimir Toncar.
    All Rights Reserved.

    Contributor(s): ______________________________________.

 ***************************************************************************/

#ifndef _WAVCHAN_H
#define _WAVCHAN_H

#include <ptlib.h>
#include <h323.h>
#include <ptclib/pwavfile.h>
#include <ptclib/delaychan.h>
#include "ep.h"

// ***********************************************************************

class WavChannel: public PIndirectChannel 
{
  PCLASSINFO(WavChannel, PIndirectChannel);
	MyEndPoint     &myEndPoint;
	PWAVFile wavFile;
	PAdaptiveDelay writeDelay;
	PAdaptiveDelay readDelay;
public:
	WavChannel(const PString & aFileName, MyEndPoint &_myEndPoint);
	~WavChannel();
	virtual BOOL Close(); 
	virtual BOOL IsOpen() const;
	virtual BOOL Read(void *buf, PINDEX len);
	virtual BOOL Write(const void *buf, PINDEX len); 
};


#endif