# PWAVFileFormat Class Reference

Abstract factory class for handling WAV files formats. More...

`#include <pwavfile.h>`

List of all members.

## Public Member Functions

virtual | ~PWAVFileFormat ()
virtual unsigned | GetFormat () const =0
| Return a PWAVFile format code.
virtual PString | GetFormatString () const =0
| Return a string that can be used as a media format.
virtual PString | GetDescription () const =0
| Return a string that can be used as a text description.
virtual bool | CanSetChannels (unsigned channels) const =0
| Check that this format can be set to the number of channels.
virtual void | CreateHeader (PWAV::FMTChunk &header, PBYTEArray &extendedHeader)=0
| Populate the header with the correct values.
virtual void | UpdateHeader (PWAV::FMTChunk &, PBYTEArray &)
| Populate the header with the correct values after initial parameters are set.
virtual PBoolean | WriteExtraChunks (PWAVFile &)
| Write any extra headers after the FORMAT chunk.
virtual PBoolean | ReadExtraChunks (PWAVFile &)
| Read any extra headers after the FORMAT chunk.
virtual void | OnStart ()
| Called before the reading/writing starts.
virtual void | OnStop ()
| Called after the reading/writing stops.
virtual PBoolean | Read (PWAVFile &file, void *buf, PINDEX &len)
| Write data to the file.
virtual PBoolean | Write (PWAVFile &file, const void *buf, PINDEX &len)
| Read data from the file.

## Detailed Description

Abstract factory class for handling WAV files formats.

## Constructor & Destructor Documentation

virtual PWAVFileFormat::~PWAVFileFormat | ( |  | ) | `[inline, virtual]`

## Member Function Documentation

virtual bool PWAVFileFormat::CanSetChannels | ( | unsigned | channels | ) | const`[pure virtual]`

Check that this format can be set to the number of channels.

virtual void PWAVFileFormat::CreateHeader | ( | PWAV::FMTChunk & | header,
|  | PBYTEArray & | extendedHeader |
| ) |  |  | `[pure virtual]`

Populate the header with the correct values.

virtual PString PWAVFileFormat::GetDescription | ( |  | ) | const`[pure virtual]`

Return a string that can be used as a text description.

virtual unsigned PWAVFileFormat::GetFormat | ( |  | ) | const`[pure virtual]`

Return a PWAVFile format code.

virtual PString PWAVFileFormat::GetFormatString | ( |  | ) | const`[pure virtual]`

Return a string that can be used as a media format.

virtual void PWAVFileFormat::OnStart | ( |  | ) | `[inline, virtual]`

Called before the reading/writing starts.

virtual void PWAVFileFormat::OnStop | ( |  | ) | `[inline, virtual]`

Called after the reading/writing stops.

virtual PBoolean PWAVFileFormat::Read | ( | PWAVFile & | file,
|  | void * | buf,
|  | PINDEX & | len |
| ) |  |  | `[virtual]`

Write data to the file.

virtual PBoolean PWAVFileFormat::ReadExtraChunks | ( | PWAVFile & |  | ) | `[inline, virtual]`

Read any extra headers after the FORMAT chunk.

virtual void PWAVFileFormat::UpdateHeader | ( | PWAV::FMTChunk & | ,
|  | PBYTEArray & |  |
| ) |  |  | `[inline, virtual]`

Populate the header with the correct values after initial parameters are set.

virtual PBoolean PWAVFileFormat::Write | ( | PWAVFile & | file,
|  | const void * | buf,
|  | PINDEX & | len |
| ) |  |  | `[virtual]`

Read data from the file.

virtual PBoolean PWAVFileFormat::WriteExtraChunks | ( | PWAVFile & |  | ) | `[inline, virtual]`

Write any extra headers after the FORMAT chunk.

The documentation for this class was generated from the following file:

- pwavfile.h