I now have this in my callback function:

short* data = oframe->data[0];
for (int i = 0; i < oframe->nb_samples; ++i) {
    //divide by SHRT_MAX to transform into double between 0 and 1
    _outBuffer[i] = (double) data[i] / (double) SHRT_MAX;
}

It seems fine in respect to the final result and its similarity to those obtained with other "audio extraction methods".

Can somebody just confirms that i'm not doing dumb conversion?

thanks

Florian
_______________________________________________
libav-api mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-api

Reply via email to