1. Peter Nixon
  2. h323ac


h323ac / 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

    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 PSoundChannel 
  PCLASSINFO(WavChannel, PSoundChannel);


  WavChannel(const PString & aFileName, H323Connection & aConnection);
  virtual BOOL Close(); 
  virtual BOOL IsOpen() const;
  virtual BOOL Read(void *buf, PINDEX len);
  virtual BOOL Write(const void *buf, PINDEX len); 
  H323Connection &myConnection;
  PWAVFile wavFile;
  PAdaptiveDelay writeDelay;
  PAdaptiveDelay readDelay;