65 s->
glopts = twolame_init();
86 twolame_set_VBR_level(s->
glopts,
89 "VBR in MP2 is a hack, use another codec that supports it.\n");
94 ret = twolame_init_params(s->
glopts);
115 ret = twolame_encode_buffer_float32_interleaved(s->
glopts,
116 (
const float *)frame->
data[0],
122 ret = twolame_encode_buffer_float32(s->
glopts,
123 (
const float *)frame->
data[0],
124 (
const float *)frame->
data[1],
129 ret = twolame_encode_buffer_interleaved(s->
glopts,
130 (
const short int *)frame->
data[0],
135 ret = twolame_encode_buffer(s->
glopts,
136 (
const short int *)frame->
data[0],
137 (
const short int *)frame->
data[1],
143 "Unsupported sample format %d.\n", avctx->
sample_fmt);
171 #define OFFSET(x) offsetof(TWOLAMEContext, x)
172 #define AE AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM
182 {
"error_protection",
"enable CRC error protection",
OFFSET(error_protection),
AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1,
AE},
185 {
"verbosity",
"set library optput level (0-10)",
OFFSET(verbosity),
AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 10,
AE},
202 16000, 22050, 24000, 32000, 44100, 48000, 0
206 .
name =
"libtwolame",
216 .priv_class = &twolame_class,
224 .channel_layouts = (
const uint64_t[]) {