Closed iqqmuT closed 9 years ago
We have alot of audio issues, first of all we ported composer to qaudiodecoder (qt multimedia) which works perfect on linux, but is a piece of crap on windows, then there's the master/ffmpeg stuff in which I removed all the deprecated code so it'll compile correctly, but that breaks alot of shit ;-( I'll look into it next weekend. probably needs the new libavresample code to detect sample format and convert between them
I think we should avoid detecting sample type here and always convert the audio into a known sample format (see performous code).
@yoda-jm That's exatly what I meant, and you can do that with libavresample by setting: av_opt_set_int(avr, "in_sample_fmt", AV-CODEC_CONTEXT->sample_fmt, 0); av_opt_set_int(avr, "out_sample_fmt", AV_SAMPLE_FMT_S16, 0);
then convert it with: out_samples = avresample_convert(avr, &output, out_linesize, out_samples, input, in_linesize, in_samples);
Like I did with performous.
I pushed my first attempt to the new avresampledecode branch, in theory it shoud work, but in practice it doesn't. I was busy for 3 months fixing the old ffmpeg code in performous and this will be no exeption....
I got everything working in the avresample-decode branch, hope it works!
I merged it to master, everything should work now.
Using master branch I inserted an MP3 file but I got this error:
Seems that my MP3 was having sample format
AV_SAMPLE_FMT_U8P
which should be added tosrc/ffmpeg.cc
.http://ffmpeg.org/doxygen/trunk/group__lavu__sampfmts.html#gaf9a51ca15301871723577c730b5865c5
My setup: