00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
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