42 const float *matrix,
int flags)
45 if (in_channels!=out_channels)
62 void *
const out[6],
const int out_stride[6],
63 const void *
const in[6],
const int in_stride[6],
int len)
70 const int is= in_stride[ch];
71 const int os= out_stride[ch];
78 #define CONV(ofmt, otype, ifmt, expr)\
79 if(ctx->fmt_pair == ofmt + AV_SAMPLE_FMT_NB*ifmt){\
81 *(otype*)po = expr; pi += is; po += os;\
Number of sample formats. DO NOT USE if linking dynamically.
void * av_malloc(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
void av_audio_convert_free(AVAudioConvert *ctx)
Free audio sample format converter context.
void av_free(void *ptr)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc(). ...
static av_always_inline av_const long int lrintf(float x)
int av_audio_convert(AVAudioConvert *ctx, void *const out[6], const int out_stride[6], const void *const in[6], const int in_stride[6], int len)
Convert between audio sample formats.
Replacements for frequently missing libm functions.
static av_always_inline av_const long int lrint(double x)
Audio format conversion routines.
common internal and external API header
AVSampleFormat
Audio Sample Formats.
#define CONV(ofmt, otype, ifmt, expr)
AVAudioConvert * av_audio_convert_alloc(enum AVSampleFormat out_fmt, int out_channels, enum AVSampleFormat in_fmt, int in_channels, const float *matrix, int flags)
Create an audio sample format converter context.