New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ActiveAE: clamp floats #3339
ActiveAE: clamp floats #3339
Conversation
for (int k = 0; k < nb_floats; ++k) | ||
{ | ||
if (fabs(fbuffer[k]) > 1.0f) | ||
needClamp = true; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
aside from being worried as to where this large error is coming from, ok to inject. I wonder if some of their arm asm code is buggy. |
sorry, I was wrong here. this is caused by downmixing to 2.0. will check ffmpeg code if there is a change to have swresample care of this. |
I don't fully understand the weighting, that ffmpeg does, they always scale with 1/sqrt(2) - but 2*sqrt(2) != 2 ... but gets us obviously a boost of the volume :-) |
there is a two months old commit in ffmpeg which allows setting max value for rematix: for now I would keep this pr as is because we need clamping anyway when mixing streams for paplayer. |
paplayer mixing on song change could be handled separately or better: more carefully. Having that commit backported would save us the whole fabs on all samples. |
so you rather have the fabs in ffmpeg than the fabs here? it's not only the fading of streams of paplayer but also gui sounds. you are welcome to provide a better solution :) |
If I see that right, that ffmpeg patch does not clamp, but scale. It keeps the natural distance between the samples, which I like - but and here youre point is valid, we have no guarantee for sounds we produce ourselves and have to clamp those again alone without ffmpeg. So doing both, should improve sound quality? |
convinced. I'll backport it. |
updated. now swresample does the clamping for rematrix, we do after having mixed audio |
@FernetMenta: Thanks very much. jenkins build this please @davilla: Could you verify on your setup, if it is okay with FLT again? |
Hello guys, |
sounds ok on arm, ok to inject from me. |
see title. if ffmpeg does not convert values, the may be out of -1.0 .. 1.0
This is same strategy as SoftAE.