Fixed numerous spelling errors.
[opal.git] / include / codec / opalwavfile.h
blobf13cbf3c291d297f5969222d1664066f65100661
1 /*
2 * OpalWavFile.h
4 * WAV file class with auto-PCM conversion
6 * OpenH323 Library
8 * Copyright (c) 2002 Equivalence Pty. Ltd.
10 * The contents of this file are subject to the Mozilla Public License
11 * Version 1.0 (the "License"); you may not use this file except in
12 * compliance with the License. You may obtain a copy of the License at
13 * http://www.mozilla.org/MPL/
15 * Software distributed under the License is distributed on an "AS IS"
16 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
17 * the License for the specific language governing rights and limitations
18 * under the License.
20 * The Original Code is Open H323 Library.
22 * Contributor(s): ______________________________________.
24 * $Log$
25 * Revision 2.6 2006/02/13 03:46:16 csoutheren
26 * Added initialisation stuff to make sure that everything works OK
28 * Revision 2.5 2005/11/30 13:35:26 csoutheren
29 * Changed tags for Doxygen
31 * Revision 2.4 2004/07/15 12:19:22 rjongbloed
32 * Various enhancements to the VXML code
34 * Revision 2.3 2002/11/10 11:33:16 robertj
35 * Updated to OpenH323 v1.10.3
37 * Revision 2.2 2002/09/16 02:52:33 robertj
38 * Added #define so can select if #pragma interface/implementation is used on
39 * platform basis (eg MacOS) rather than compiler, thanks Robert Monaghan.
41 * Revision 2.1 2002/09/06 07:18:44 robertj
42 * OPAL port.
44 * Revision 1.6 2004/07/15 11:13:49 rjongbloed
45 * Migrated changes from crs_vxnml_devel branch into main trunk
47 * Revision 1.5.6.1 2004/07/07 07:10:11 csoutheren
48 * Changed to use new factory based PWAVFile
49 * Removed redundant blocking/unblocking when using G.723.1
51 * Revision 1.5 2002/09/16 01:14:15 robertj
52 * Added #define so can select if #pragma interface/implementation is used on
53 * platform basis (eg MacOS) rather than compiler, thanks Robert Monaghan.
55 * Revision 1.4 2002/09/06 06:20:37 robertj
56 * More cosmetic changes
58 * Revision 1.3 2002/08/08 13:00:02 craigs
59 * Remove unused definition of LastReadCount thanks to Peter 'Luna' Runestig
61 * Revision 1.2 2002/08/05 10:03:47 robertj
62 * Cosmetic changes to normalise the usage of pragma interface/implementation.
64 * Revision 1.1 2002/06/20 01:21:03 craigs
65 * Initial version
69 #ifndef __OPALWAVFILE_H
70 #define __OPALWAVFILE_H
72 #ifdef P_USE_PRAGMA
73 #pragma interface
74 #endif
77 #include <ptclib/pwavfile.h>
79 namespace PWLibStupidLinkerHacks {
80 extern int opalwavfileLoader;
83 /**This class is similar to the PWavFile class found in the PWlib
84 components library. However, it will tranparently convert all data
85 to/from PCM format, allowing applications to be unconcerned with
86 the underlying data format. Note that this will only work with
87 sample-based formats that can be converted to/from PCM data, such as
88 uLaw and aLaw
91 class OpalWAVFile : public PWAVFile
93 PCLASSINFO(OpalWAVFile, PWAVFile);
94 public:
95 OpalWAVFile(
96 unsigned format = fmt_PCM ///< Type of WAV File to create
99 /**Create a unique temporary file name, and open the file in the specified
100 mode and using the specified options. Note that opening a new, unique,
101 temporary file name in ReadOnly mode will always fail. This would only
102 be usefull in a mode and options that will create the file.
104 If a WAV file is being created, the type parameter can be used
105 to create a PCM Wave file or a G.723.1 Wave file by using
106 #WaveType enum#
108 The #PChannel::IsOpen()# function may be used after object
109 construction to determine if the file was successfully opened.
111 OpalWAVFile(
112 OpenMode mode, ///< Mode in which to open the file.
113 int opts = ModeDefault, ///< #OpenOptions enum# for open operation.
114 unsigned format = fmt_PCM ///< Type of WAV File to create
117 /**Create a WAV file object with the specified name and open it in
118 the specified mode and with the specified options.
119 If a WAV file is being created, the type parameter can be used
120 to create a PCM Wave file or a G.723.1 Wave file by using
121 #WaveType enum#
123 The #PChannel::IsOpen()# function may be used after object
124 construction to determine if the file was successfully opened.
126 OpalWAVFile(
127 const PFilePath & name, ///< Name of file to open.
128 OpenMode mode = ReadWrite, ///< Mode in which to open the file.
129 int opts = ModeDefault, ///< #OpenOptions enum# for open operation.
130 unsigned format = fmt_PCM ///< Type of WAV File to create
134 #endif // __OPALWAVFILE_H
137 // End of File ///////////////////////////////////////////////////////////////