Main Page   Namespace List   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   Related Pages  

ac3::CBitResConverter Class Reference

Converts 8, 16, 24 and 32 bit samples in any combination. More...

#include <bitres_converter.h>

List of all members.

Static Public Methods

void ConvertBitResolution (UINT32 nSampleCount, void *pSource, UINT16 nSourceResolution, void *pDest, UINT16 nDestResolution)
 Converts 8, 16, 24 and 32 bit samples in any combination.


Detailed Description

Converts 8, 16, 24 and 32 bit samples in any combination.

Todo:
Optimize for speed.

This class offers only one static function that is able to convert a buffer of 8, 16, 24 or 32 bit samples to a buffer of 8, 16, 24 or 32 bit samples.

Definition at line 24 of file bitres_converter.h.


Member Function Documentation

void ac3::CBitResConverter::ConvertBitResolution UINT32    nSampleCount,
void *    pSource,
UINT16    nSourceResolution,
void *    pDest,
UINT16    nDestResolution
[static]
 

Converts 8, 16, 24 and 32 bit samples in any combination.

Parameters:
nSampleCount  Number of samples in pSource buffer.
pSource  Buffer containing source samples.
nSourceResolution  Resolution of samples in source buffer (8, 16, 24 or 32)
pDest  Buffer to store the converted samples to.
nDestResolution  Resolution to convert to.
Converts nSampleCount samples from pSource with nSourceResolution to pDest with nDestResolution. Allowed values for nSourceResolution and nDestResolution are 8, 16, 24 and 32 in any combination.

If nDestResolution is equal or higher nSourceResolution the conversion is not lossy.

Note that 8 bit data is unsigned and a "silent" sample (-inf db) has value 0x80. 16, 24 and 32 bit data is signed and a "silent" sample has value 0.

Definition at line 33 of file bitres_converter.cpp.

References ac3::INT16, ac3::INT32, ac3::UINT16, ac3::UINT32, and ac3::UINT8.


The documentation for this class was generated from the following files:
Generated on Sat Sep 25 14:06:52 2004 for ac3 by doxygen1.2.18