Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

opalwavfile.h

Go to the documentation of this file.
00001 /* 00002 * OpalWavFile.h 00003 * 00004 * WAV file class with auto-PCM conversion 00005 * 00006 * OpenH323 Library 00007 * 00008 * Copyright (c) 2002 Equivalence Pty. Ltd. 00009 * 00010 * The contents of this file are subject to the Mozilla Public License 00011 * Version 1.0 (the "License"); you may not use this file except in 00012 * compliance with the License. You may obtain a copy of the License at 00013 * http://www.mozilla.org/MPL/ 00014 * 00015 * Software distributed under the License is distributed on an "AS IS" 00016 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See 00017 * the License for the specific language governing rights and limitations 00018 * under the License. 00019 * 00020 * The Original Code is Open H323 Library. 00021 * 00022 * Contributor(s): ______________________________________. 00023 * 00024 * $Log: opalwavfile.h,v $ 00025 * Revision 1.5 2002/09/16 01:14:15 robertj 00026 * Added #define so can select if #pragma interface/implementation is used on 00027 * platform basis (eg MacOS) rather than compiler, thanks Robert Monaghan. 00028 * 00029 * Revision 1.4 2002/09/06 06:20:37 robertj 00030 * More cosmetic changes 00031 * 00032 * Revision 1.3 2002/08/08 13:00:02 craigs 00033 * Remove unused definition of LastReadCount thanks to Peter 'Luna' Runestig 00034 * 00035 * Revision 1.2 2002/08/05 10:03:47 robertj 00036 * Cosmetic changes to normalise the usage of pragma interface/implementation. 00037 * 00038 * Revision 1.1 2002/06/20 01:21:03 craigs 00039 * Initial version 00040 * 00041 */ 00042 00043 #ifndef __OPALWAVFILE_H 00044 #define __OPALWAVFILE_H 00045 00046 #ifdef P_USE_PRAGMA 00047 #pragma interface 00048 #endif 00049 00050 00051 #include <ptclib/pwavfile.h> 00052 00053 00054 00063 class OpalWAVFile : public PWAVFile 00064 { 00065 PCLASSINFO(OpalWAVFile, PWAVFile); 00066 public: 00067 OpalWAVFile( 00068 unsigned format = fmt_PCM 00069 ); 00070 00083 OpalWAVFile( 00084 OpenMode mode, 00085 int opts = ModeDefault, 00086 unsigned format = fmt_PCM 00087 ); 00088 00098 OpalWAVFile( 00099 const PFilePath & name, 00100 OpenMode mode = ReadWrite, 00101 int opts = ModeDefault, 00102 unsigned format = fmt_PCM 00103 ); 00104 00108 unsigned GetFormat() const; 00109 00110 BOOL Read(void * buf, PINDEX len); 00111 00112 BOOL Write(const void * buf, PINDEX len); 00113 00114 off_t GetPosition() const; 00115 00116 BOOL SetPosition(off_t pos, FilePositionOrigin origin = Start); 00117 00118 unsigned GetSampleSize() const; 00119 00120 off_t GetDataLength(); 00121 00122 protected: 00123 void SetUnderlyingFormat(unsigned format); 00124 BOOL IsFormatXLaw() const; 00125 unsigned realFormat; 00126 BOOL translate; 00127 }; 00128 00129 #endif // __OPALWAVFILE_H 00130 00131 00132 // End of File ///////////////////////////////////////////////////////////////

Generated on Sat Jul 24 17:03:36 2004 for OpenH323 by doxygen 1.3.7