41 const char *
filter_descr =
"aresample=8000,aformat=sample_fmts=s16:channel_layouts=mono";
42 const char *
player =
"ffplay -f s16le -ar 8000 -ac 1 -";
95 const int out_sample_rates[] = { 8000, -1 };
105 "time_base=%d/%d:sample_rate=%d:sample_fmt=%s:channel_layout=0x%"PRIx64,
109 args, NULL, filter_graph);
117 NULL, NULL, filter_graph);
148 outputs->
next = NULL;
156 &inputs, &outputs, NULL)) < 0)
164 outlink = buffersink_ctx->
inputs[0];
177 const uint16_t *p = (uint16_t*)frame->
data[0];
178 const uint16_t *p_end = p + n;
181 fputc(*p & 0xff, stdout);
182 fputc(*p>>8 & 0xff, stdout);
188 int main(
int argc,
char **argv)
196 if (!frame || !filt_frame) {
197 perror(
"Could not allocate frame");
201 fprintf(stderr,
"Usage: %s file | %s\n", argv[0],
player);
260 fprintf(stderr,
"Error occurred: %s\n", buf);