Murl::Util::SampleConverter Class Reference

Sample format conversion class. More...

#include "murl_util_sample_converter.h"

Public Types

using Method = void(*)(UInt8 *dstPtr, const UInt8 *srcPtr, UInt32 numberOfSamples)
 Definition of the converter function pointer. More...
 

Static Public Member Functions

static Method GetConverter (IEnums::SampleFormat destFormat, IEnums::SampleFormat srcFormat)
 Get the converter function pointer for specified sample formats. More...
 
static Method GetFromM8 (IEnums::SampleFormat destFormat)
 Get the converter function pointer from MONO_8 source format. More...
 
static void M8ToM8 (UInt8 *dstPtr, const UInt8 *srcPtr, UInt32 numberOfSamples)
 The MONO_8 to MONO_8 conversion function. More...
 
static void M8ToM16 (UInt8 *dstPtr, const UInt8 *srcPtr, UInt32 numberOfSamples)
 The MONO_8 to MONO_16 conversion function. More...
 
static void M8ToS8 (UInt8 *dstPtr, const UInt8 *srcPtr, UInt32 numberOfSamples)
 The MONO_8 to STEREO_8 conversion function. More...
 
static void M8ToS16 (UInt8 *dstPtr, const UInt8 *srcPtr, UInt32 numberOfSamples)
 The MONO_8 to STEREO_16 conversion function. More...
 
static Method GetFromM16 (IEnums::SampleFormat destFormat)
 Get the converter function pointer from MONO_16 source format. More...
 
static void M16ToM8 (UInt8 *dstPtr, const UInt8 *srcPtr, UInt32 numberOfSamples)
 The MONO_16 to MONO_8 conversion function. More...
 
static void M16ToM16 (UInt8 *dstPtr, const UInt8 *srcPtr, UInt32 numberOfSamples)
 The MONO_16 to MONO_16 conversion function. More...
 
static void M16ToS8 (UInt8 *dstPtr, const UInt8 *srcPtr, UInt32 numberOfSamples)
 The MONO_16 to STEREO_8 conversion function. More...
 
static void M16ToS16 (UInt8 *dstPtr, const UInt8 *srcPtr, UInt32 numberOfSamples)
 The MONO_16 to STEREO_16 conversion function. More...
 
static Method GetFromS8 (IEnums::SampleFormat destFormat)
 Get the converter function pointer from STEREO_8 source format. More...
 
static void S8ToM8 (UInt8 *dstPtr, const UInt8 *srcPtr, UInt32 numberOfSamples)
 The STEREO_8 to MONO_8 conversion function. More...
 
static void S8ToM16 (UInt8 *dstPtr, const UInt8 *srcPtr, UInt32 numberOfSamples)
 The STEREO_8 to MONO_16 conversion function. More...
 
static void S8ToS8 (UInt8 *dstPtr, const UInt8 *srcPtr, UInt32 numberOfSamples)
 The STEREO_8 to STEREO_8 conversion function. More...
 
static void S8ToS16 (UInt8 *dstPtr, const UInt8 *srcPtr, UInt32 numberOfSamples)
 The STEREO_8 to STEREO_16 conversion function. More...
 
static Method GetFromS16 (IEnums::SampleFormat destFormat)
 Get the converter function pointer from STEREO_16 source format. More...
 
static void S16ToM8 (UInt8 *dstPtr, const UInt8 *srcPtr, UInt32 numberOfSamples)
 The STEREO_16 to MONO_8 conversion function. More...
 
static void S16ToM16 (UInt8 *dstPtr, const UInt8 *srcPtr, UInt32 numberOfSamples)
 The STEREO_16 to MONO_16 conversion function. More...
 
static void S16ToS8 (UInt8 *dstPtr, const UInt8 *srcPtr, UInt32 numberOfSamples)
 The STEREO_16 to STEREO_8 conversion function. More...
 
static void S16ToS16 (UInt8 *dstPtr, const UInt8 *srcPtr, UInt32 numberOfSamples)
 The STEREO_16 to STEREO_16 conversion function. More...
 

Detailed Description

Sample format conversion class.

Member Typedef Documentation

◆ Method

using Murl::Util::SampleConverter::Method = void(*)(UInt8* dstPtr, const UInt8* srcPtr, UInt32 numberOfSamples)

Definition of the converter function pointer.

Use IEnums::GetSampleFormatByteSize() to calculate the size of the source and destination memory.

Parameters
dstPtrPointer to the destination memory.
srcPtrPointer to the source memory.
numberOfSamplesThe number of samples to convert.

Member Function Documentation

◆ GetConverter()

static Method Murl::Util::SampleConverter::GetConverter ( IEnums::SampleFormat  destFormat,
IEnums::SampleFormat  srcFormat 
)
static

Get the converter function pointer for specified sample formats.

Parameters
destFormatThe destination sample format.
srcFormatThe source sample format.
Returns
The converter function pointer or null if the conversion is not available.

◆ GetFromM8()

static Method Murl::Util::SampleConverter::GetFromM8 ( IEnums::SampleFormat  destFormat)
static

Get the converter function pointer from MONO_8 source format.

Parameters
destFormatThe destination sample format.
Returns
The converter function pointer or null if the conversion is not available.

◆ M8ToM8()

static void Murl::Util::SampleConverter::M8ToM8 ( UInt8 dstPtr,
const UInt8 srcPtr,
UInt32  numberOfSamples 
)
static

The MONO_8 to MONO_8 conversion function.

Parameters
dstPtrPointer to the destination memory.
srcPtrPointer to the source memory.
numberOfSamplesThe number of samples to convert.

◆ M8ToM16()

static void Murl::Util::SampleConverter::M8ToM16 ( UInt8 dstPtr,
const UInt8 srcPtr,
UInt32  numberOfSamples 
)
static

The MONO_8 to MONO_16 conversion function.

Parameters
dstPtrPointer to the destination memory.
srcPtrPointer to the source memory.
numberOfSamplesThe number of samples to convert.

◆ M8ToS8()

static void Murl::Util::SampleConverter::M8ToS8 ( UInt8 dstPtr,
const UInt8 srcPtr,
UInt32  numberOfSamples 
)
static

The MONO_8 to STEREO_8 conversion function.

Parameters
dstPtrPointer to the destination memory.
srcPtrPointer to the source memory.
numberOfSamplesThe number of samples to convert.

◆ M8ToS16()

static void Murl::Util::SampleConverter::M8ToS16 ( UInt8 dstPtr,
const UInt8 srcPtr,
UInt32  numberOfSamples 
)
static

The MONO_8 to STEREO_16 conversion function.

Parameters
dstPtrPointer to the destination memory.
srcPtrPointer to the source memory.
numberOfSamplesThe number of samples to convert.

◆ GetFromM16()

static Method Murl::Util::SampleConverter::GetFromM16 ( IEnums::SampleFormat  destFormat)
static

Get the converter function pointer from MONO_16 source format.

Parameters
destFormatThe destination sample format.
Returns
The converter function pointer or null if the conversion is not available.

◆ M16ToM8()

static void Murl::Util::SampleConverter::M16ToM8 ( UInt8 dstPtr,
const UInt8 srcPtr,
UInt32  numberOfSamples 
)
static

The MONO_16 to MONO_8 conversion function.

Parameters
dstPtrPointer to the destination memory.
srcPtrPointer to the source memory.
numberOfSamplesThe number of samples to convert.

◆ M16ToM16()

static void Murl::Util::SampleConverter::M16ToM16 ( UInt8 dstPtr,
const UInt8 srcPtr,
UInt32  numberOfSamples 
)
static

The MONO_16 to MONO_16 conversion function.

Parameters
dstPtrPointer to the destination memory.
srcPtrPointer to the source memory.
numberOfSamplesThe number of samples to convert.

◆ M16ToS8()

static void Murl::Util::SampleConverter::M16ToS8 ( UInt8 dstPtr,
const UInt8 srcPtr,
UInt32  numberOfSamples 
)
static

The MONO_16 to STEREO_8 conversion function.

Parameters
dstPtrPointer to the destination memory.
srcPtrPointer to the source memory.
numberOfSamplesThe number of samples to convert.

◆ M16ToS16()

static void Murl::Util::SampleConverter::M16ToS16 ( UInt8 dstPtr,
const UInt8 srcPtr,
UInt32  numberOfSamples 
)
static

The MONO_16 to STEREO_16 conversion function.

Parameters
dstPtrPointer to the destination memory.
srcPtrPointer to the source memory.
numberOfSamplesThe number of samples to convert.

◆ GetFromS8()

static Method Murl::Util::SampleConverter::GetFromS8 ( IEnums::SampleFormat  destFormat)
static

Get the converter function pointer from STEREO_8 source format.

Parameters
destFormatThe destination sample format.
Returns
The converter function pointer or null if the conversion is not available.

◆ S8ToM8()

static void Murl::Util::SampleConverter::S8ToM8 ( UInt8 dstPtr,
const UInt8 srcPtr,
UInt32  numberOfSamples 
)
static

The STEREO_8 to MONO_8 conversion function.

Parameters
dstPtrPointer to the destination memory.
srcPtrPointer to the source memory.
numberOfSamplesThe number of samples to convert.

◆ S8ToM16()

static void Murl::Util::SampleConverter::S8ToM16 ( UInt8 dstPtr,
const UInt8 srcPtr,
UInt32  numberOfSamples 
)
static

The STEREO_8 to MONO_16 conversion function.

Parameters
dstPtrPointer to the destination memory.
srcPtrPointer to the source memory.
numberOfSamplesThe number of samples to convert.

◆ S8ToS8()

static void Murl::Util::SampleConverter::S8ToS8 ( UInt8 dstPtr,
const UInt8 srcPtr,
UInt32  numberOfSamples 
)
static

The STEREO_8 to STEREO_8 conversion function.

Parameters
dstPtrPointer to the destination memory.
srcPtrPointer to the source memory.
numberOfSamplesThe number of samples to convert.

◆ S8ToS16()

static void Murl::Util::SampleConverter::S8ToS16 ( UInt8 dstPtr,
const UInt8 srcPtr,
UInt32  numberOfSamples 
)
static

The STEREO_8 to STEREO_16 conversion function.

Parameters
dstPtrPointer to the destination memory.
srcPtrPointer to the source memory.
numberOfSamplesThe number of samples to convert.

◆ GetFromS16()

static Method Murl::Util::SampleConverter::GetFromS16 ( IEnums::SampleFormat  destFormat)
static

Get the converter function pointer from STEREO_16 source format.

Parameters
destFormatThe destination sample format.
Returns
The converter function pointer or null if the conversion is not available.

◆ S16ToM8()

static void Murl::Util::SampleConverter::S16ToM8 ( UInt8 dstPtr,
const UInt8 srcPtr,
UInt32  numberOfSamples 
)
static

The STEREO_16 to MONO_8 conversion function.

Parameters
dstPtrPointer to the destination memory.
srcPtrPointer to the source memory.
numberOfSamplesThe number of samples to convert.

◆ S16ToM16()

static void Murl::Util::SampleConverter::S16ToM16 ( UInt8 dstPtr,
const UInt8 srcPtr,
UInt32  numberOfSamples 
)
static

The STEREO_16 to MONO_16 conversion function.

Parameters
dstPtrPointer to the destination memory.
srcPtrPointer to the source memory.
numberOfSamplesThe number of samples to convert.

◆ S16ToS8()

static void Murl::Util::SampleConverter::S16ToS8 ( UInt8 dstPtr,
const UInt8 srcPtr,
UInt32  numberOfSamples 
)
static

The STEREO_16 to STEREO_8 conversion function.

Parameters
dstPtrPointer to the destination memory.
srcPtrPointer to the source memory.
numberOfSamplesThe number of samples to convert.

◆ S16ToS16()

static void Murl::Util::SampleConverter::S16ToS16 ( UInt8 dstPtr,
const UInt8 srcPtr,
UInt32  numberOfSamples 
)
static

The STEREO_16 to STEREO_16 conversion function.

Parameters
dstPtrPointer to the destination memory.
srcPtrPointer to the source memory.
numberOfSamplesThe number of samples to convert.

The documentation for this class was generated from the following file:
  • murl_util_sample_converter.h


Copyright © 2011-2024 Spraylight GmbH.