MythTV  master
Classes | Macros | Functions
audioconvert.cpp File Reference
#include "audioconvert.h"
#include <algorithm>
#include <cmath>
#include <cstdint>
#include "libavcodec/avcodec.h"
#include "libswresample/swresample.h"
#include <QtGlobal>
#include "libmythbase/mythlogging.h"
#include "mythaverror.h"
Include dependency graph for audioconvert.cpp:

Go to the source code of this file.

Classes

class  AudioConvertInternal
 

Macros

#define LOC   QString("AudioConvert: ")
 

Functions

static float clipcheck (float f)
 
static int toFloat8 (float *out, const uint8_t *in, int len)
 
static uint8_t clip_uint8 (int a)
 
static int fromFloat8 (uint8_t *out, const float *in, int len)
 
static int toFloat16 (float *out, const short *in, int len)
 
static short clip_short (int a)
 
static int fromFloat16 (short *out, const float *in, int len)
 
static int toFloat32 (AudioFormat format, float *out, const int *in, int len)
 
static int fromFloat32 (AudioFormat format, int *out, const float *in, int len)
 
static int fromFloatFLT (float *out, const float *in, int len)
 
template<class AudioDataType >
void tDeinterleaveSample (AudioDataType *out, const AudioDataType *in, int channels, int frames)
 
template<class AudioDataType >
void tInterleaveSample (AudioDataType *out, const AudioDataType *in, int channels, int frames, const AudioDataType *const *inp=nullptr)
 

Macro Definition Documentation

◆ LOC

#define LOC   QString("AudioConvert: ")

Definition at line 41 of file audioconvert.cpp.

Function Documentation

◆ clipcheck()

static float clipcheck ( float  f)
inlinestatic

Definition at line 76 of file audioconvert.cpp.

Referenced by fromFloatFLT().

◆ toFloat8()

static int toFloat8 ( float *  out,
const uint8_t *  in,
int  len 
)
static

Definition at line 85 of file audioconvert.cpp.

Referenced by AudioConvert::toFloat().

◆ clip_uint8()

static uint8_t clip_uint8 ( int  a)
inlinestatic

Definition at line 153 of file audioconvert.cpp.

Referenced by fromFloat8().

◆ fromFloat8()

static int fromFloat8 ( uint8_t *  out,
const float *  in,
int  len 
)
static

Definition at line 160 of file audioconvert.cpp.

Referenced by AudioConvert::fromFloat().

◆ toFloat16()

static int toFloat16 ( float *  out,
const short *  in,
int  len 
)
static

Definition at line 212 of file audioconvert.cpp.

Referenced by AudioConvert::toFloat().

◆ clip_short()

static short clip_short ( int  a)
inlinestatic

Definition at line 267 of file audioconvert.cpp.

Referenced by fromFloat16().

◆ fromFloat16()

static int fromFloat16 ( short *  out,
const float *  in,
int  len 
)
static

Definition at line 274 of file audioconvert.cpp.

Referenced by AudioConvert::fromFloat().

◆ toFloat32()

static int toFloat32 ( AudioFormat  format,
float *  out,
const int *  in,
int  len 
)
static

Definition at line 321 of file audioconvert.cpp.

Referenced by AudioConvert::toFloat().

◆ fromFloat32()

static int fromFloat32 ( AudioFormat  format,
int *  out,
const float *  in,
int  len 
)
static

Definition at line 378 of file audioconvert.cpp.

Referenced by AudioConvert::fromFloat().

◆ fromFloatFLT()

static int fromFloatFLT ( float *  out,
const float *  in,
int  len 
)
static

Definition at line 466 of file audioconvert.cpp.

Referenced by AudioConvert::fromFloat().

◆ tDeinterleaveSample()

template<class AudioDataType >
void tDeinterleaveSample ( AudioDataType *  out,
const AudioDataType *  in,
int  channels,
int  frames 
)

Definition at line 735 of file audioconvert.cpp.

Referenced by AudioConvert::DeinterleaveSamples().

◆ tInterleaveSample()

template<class AudioDataType >
void tInterleaveSample ( AudioDataType *  out,
const AudioDataType *  in,
int  channels,
int  frames,
const AudioDataType *const *  inp = nullptr 
)

Definition at line 784 of file audioconvert.cpp.

Referenced by AudioConvert::InterleaveSamples().