35 #define OFFSET(x) offsetof(AVAudioResampleContext, x) 36 #define PARAM AV_OPT_FLAG_AUDIO_PARAM 39 {
"in_channel_layout",
"Input Channel Layout",
OFFSET(in_channel_layout),
AV_OPT_TYPE_INT64, { .i64 = 0 }, INT64_MIN, INT64_MAX,
PARAM },
41 {
"in_sample_rate",
"Input Sample Rate",
OFFSET(in_sample_rate),
AV_OPT_TYPE_INT, { .i64 = 48000 }, 1, INT_MAX, PARAM },
42 {
"out_channel_layout",
"Output Channel Layout",
OFFSET(out_channel_layout),
AV_OPT_TYPE_INT64, { .i64 = 0 }, INT64_MIN, INT64_MAX, PARAM },
44 {
"out_sample_rate",
"Output Sample Rate",
OFFSET(out_sample_rate),
AV_OPT_TYPE_INT, { .i64 = 48000 }, 1, INT_MAX, PARAM },
60 {
"center_mix_level",
"Center Mix Level",
OFFSET(center_mix_level),
AV_OPT_TYPE_DOUBLE, { .dbl = M_SQRT1_2 }, -32.0, 32.0, PARAM },
61 {
"surround_mix_level",
"Surround Mix Level",
OFFSET(surround_mix_level),
AV_OPT_TYPE_DOUBLE, { .dbl = M_SQRT1_2 }, -32.0, 32.0, PARAM },
63 {
"normalize_mix_level",
"Normalize Mix Level",
OFFSET(normalize_mix_level),
AV_OPT_TYPE_INT, { .i64 = 1 }, 0, 1, PARAM },
64 {
"force_resampling",
"Force Resampling",
OFFSET(force_resampling),
AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, PARAM },
65 {
"filter_size",
"Resampling Filter Size",
OFFSET(filter_size),
AV_OPT_TYPE_INT, { .i64 = 16 }, 0, 32, PARAM },
66 {
"phase_shift",
"Resampling Phase Shift",
OFFSET(phase_shift),
AV_OPT_TYPE_INT, { .i64 = 10 }, 0, 30, PARAM },
67 {
"linear_interp",
"Use Linear Interpolation",
OFFSET(linear_interp),
AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, PARAM },
70 {
"resample_cutoff",
"Cutoff Frequency Ratio",
OFFSET(cutoff),
AV_OPT_TYPE_DOUBLE, { .dbl = 0.8 }, 0.0, 1.0, PARAM },
79 {
"kaiser_beta",
"Kaiser Window Beta",
OFFSET(kaiser_beta),
AV_OPT_TYPE_INT, { .i64 = 9 }, 2, 16, PARAM },
Number of sample formats. DO NOT USE if linking dynamically.
memory handling functions
void av_opt_set_defaults(void *s)
Set the values of all AVOption fields to their default values.
Triangular Dither with Noise Shaping.
const AVClass * avresample_get_class(void)
Get the AVClass for AVAudioResampleContext.
Triangular Dither with High Pass.
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
const AVClass * av_class
AVClass for logging and AVOptions.
static const AVOption avresample_options[]
Describe the class of an AVClass context structure.
Blackman Nuttall Windowed Sinc.
AVAudioResampleContext * avresample_alloc_context(void)
Allocate AVAudioResampleContext and set options.
static const AVClass av_resample_context_class
void * av_mallocz(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...