#include <wav_writer.h>
Public Methods | |
| CWAVWriter () | |
| Standard constructor doing nothing. | |
| CWAVWriter (const char *pszFilename, UINT32 nSampleRate, UINT16 nChannelNum, UINT16 nBitResolution) | |
| Contructor for opening a WAV-file during construction. | |
| CWAVWriter (const std::string &sFilename, UINT32 nSampleRate, UINT16 nChannelNum, UINT16 nBitResolution) | |
| Contructor for opening a WAV-file during construction. | |
| ~CWAVWriter () | |
| Standard destructor. | |
| void | OpenFile (const char *pszFilename, UINT32 nSampleRate, UINT16 nChannelNum, UINT16 nBitResolution) |
| Opens a WAV-file. | |
| void | OpenFile (const std::string &sFilename, UINT32 nSampleRate, UINT16 nChannelNum, UINT16 nBitResolution) |
| Opens a WAV-file. | |
| void | CloseFile () |
| Closes the the opened WAV-file. | |
| void | Write8BitSamples (UINT8 **ppSource, UINT32 nCount) |
| Writes 8 bit samples to the WAV-file. | |
| void | Write16BitSamples (INT16 **ppSource, UINT32 nCount) |
| Writes 16 bit samples to the WAV-file. | |
| void | Write24BitSamples (INT32 **ppSource, UINT32 nCount) |
| Writes 24 bit samples to the WAV-file. | |
| void | Write32BitSamples (INT32 **ppSource, UINT32 nCount) |
| Writes 32 bit samples to the WAV-file. | |
You can use this class to write WAV-files. Currently PCM WAV-files with 8, 16, 24 or 32 bits per sample, any channel number (at least one) and any sample rate (greater 0) are supported. The class is able to write the samples in the passed buffers (one buffer for each channel) to the WAV-file. It will perform the bit rate conversion if necessary.
If there occurs an error during any function the class will throw an exception of type CWAVWriterException.
Definition at line 74 of file wav_writer.h.
|
|
Closes the the opened WAV-file. Use this function if you have finished writing data to the WAV-file. Definition at line 140 of file wav_writer.cpp. Referenced by OpenFile(). |
|
||||||||||||||||||||
|
Opens a WAV-file.
Definition at line 92 of file wav_writer.cpp. References OpenFile(), ac3::UINT16, and ac3::UINT32. |
|
||||||||||||||||||||
|
Opens a WAV-file.
Definition at line 109 of file wav_writer.cpp. References CloseFile(), ac3::UINT16, and ac3::UINT32. Referenced by OpenFile(). |
|
||||||||||||
|
Writes 16 bit samples to the WAV-file.
The function expects an array of buffers (one buffer for each channel) containing the samples to write. Each sample is a signed 16 bit integer. "Silent" samples (-inf db) have value 0. Definition at line 239 of file wav_writer.cpp. References ac3::INT16, ac3::UINT16, and ac3::UINT32. |
|
||||||||||||
|
Writes 24 bit samples to the WAV-file.
The function expects an array of buffers (one buffer for each channel) containing the samples to write. Each sample is a signed 32 bit integer, but only the 24 least significant bis are written. "Silent" samples (-inf db) have value 0. Definition at line 306 of file wav_writer.cpp. References ac3::INT32, ac3::UINT16, and ac3::UINT32. |
|
||||||||||||
|
Writes 32 bit samples to the WAV-file.
The function expects an array of buffers (one buffer for each channel) containing the samples to write. Each sample is a signed 32 bit integer. "Silent" samples (-inf db) have value 0. Definition at line 372 of file wav_writer.cpp. References ac3::INT32, ac3::UINT16, and ac3::UINT32. |
|
||||||||||||
|
Writes 8 bit samples to the WAV-file.
The function expects an array of buffers (one buffer for each channel) containing the samples to write. Each sample is an unsigned 8 bit integer. "Silent" samples (-inf db) have value 0x80. Definition at line 173 of file wav_writer.cpp. References ac3::UINT16, ac3::UINT32, and ac3::UINT8. |
1.2.18