Wave Arts VQE  1.00
Voice Quality Enhancement
Public Member Functions | Protected Attributes
WaveNativeFileOut Class Reference

WAV file writer. More...

#include <WaveNativeFileIO.h>

Inheritance diagram for WaveNativeFileOut:
AFileOut

List of all members.

Public Member Functions

 WaveNativeFileOut (long cvtBufFileSize=2048)
 Create WAV file writer.
bool Open (char *fileName, long sampleRate, int sampleSize, int numChannels)
 Create output file.
int GetNumChannels ()
 Get the number of audio channels.
int GetBitsPerSamp ()
 Get the number of bits per sample.
int GetSampSize ()
 Get the sample size in bytes.
int GetFrameSize ()
 Get the frame size in bytes.
long GetSampRate ()
 Get the sample rate.
long Tell ()
 Get current write offset.
long Write (char *buf, long numBytes)
 Write raw data.
long WriteShortFrames (short *buf, long numFrames)
 Write 16-bit integer samples.
long WriteFloatFrames (float *buf, long numFrames)
 Write 32-bit float samples.
bool Close ()
 Close file.

Protected Attributes

WavCkInfo ckRIFF
 RIFF chunk.
WavCkInfo ck
 data chunk
HWavFp hWavFp
 handle to WAV file pointer
int numChannels
 number of channels
int numBitsPerSamp
 number of bits per sample
int sampSize
 sample size in bytes
int frameSize
 frame size in bytes
long sampRate
 sampling rate

Detailed Description

WAV file writer.


Member Function Documentation

bool WaveNativeFileOut::Close ( ) [virtual]

Close file.

This will update any internal chunk information and close file.

Implements AFileOut.

bool WaveNativeFileOut::Open ( char *  fileName,
long  sampleRate,
int  numBitsPerSamp,
int  numChannels 
) [virtual]

Create output file.

Parameters:
[in]fileNamepath of file to create
[in]sampleRatesampling rate
[in]numBitsPerSampnumber of bits per sample
[in]numChannelsnumber of channels

Create audio file. Returns true if success, false if error.

Implements AFileOut.

long WaveNativeFileOut::Write ( char *  buf,
long  numBytes 
) [virtual]

Write raw data.

Parameters:
[in]bufraw data to write
[in]numBytesnumber of bytes to write

Write raw sample data. This is called internally and the user will probably prefer one of the other writer functions.

Implements AFileOut.

long WaveNativeFileOut::WriteFloatFrames ( float *  buf,
long  numFrames 
) [virtual]

Write 32-bit float samples.

Parameters:
[in]bufpointer to 32-bit float samples
[in]numFramesnumber of sample frames to write

Convert from 32-bit float samples to file format and write. Multi-channel data is specified in interleaved format. Return number of sample frames written.

Implements AFileOut.

long WaveNativeFileOut::WriteShortFrames ( short *  buf,
long  numFrames 
) [virtual]

Write 16-bit integer samples.

Parameters:
[in]bufpointer to 16-bit integer samples
[in]numFramesnumber of sample frames to write

Convert from 16-bit integer samples to file format and write. Multi-channel data is specified in interleaved format. Return number of sample frames written.

Implements AFileOut.


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines