-
Notifications
You must be signed in to change notification settings - Fork 95
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
Fade & replay gain #40
Comments
I reverted the change because the patch I was provided to attempt to fix the compiler warning completely broke crossfade. @@ -152,7 +152,7 @@
{ Thank you for taking the time to report your fixes back to me. Change committed at 3028f38 |
Thanks :-) What bothered me is that with the existing test, crossfade should not work when there is replaygain. I did explicity test it and the replaygain of the next track was applied to the current track when doing the crossfade, so with a big difference between the current and next, it was very audible. I'm surprised nobody ever complained, hence I was nervous my analysis was wrong. But I did checked the same 2 tracks with a big replay gain difference with old and new test and definitevly saw that new one works, old one does not ... |
I was seeing some issues with my modified squeezelite version for AirPlay bridge and fading + replaygain (maybe). I did the same correction you did in commit #724 a while ago, for the same reasons (compiler warning) but never reverted it. It seems to me that the original test is wrong
if (!ctx->output.fade == FADE_ACTIVE || !ctx->output.fade_mode == FADE_CROSSFADE)
This cannot be right. fade is an enum so !fade will never be FADE_ACTIVE (==2). this part of the expression is always false. It's ORed with !fade_mode which will only equal FADE_CROSSFADE (==1) if fade_mode is FADE_NONE. So replay gain is set to new one only when fade_mode it set to NONE, which is not desired for IN, OUT and INOUT. So I don't understand how the original version could work
Isn't what is trying to be done the following?
if (ctx->output.fase == FADE_INACTIVE || ctx->output.fade_mode != FADE_CROSSFADE)
In other words, change reply gain at track start when there is no fading or it is cross_fading? The current track shall be faded out with it's own (old) gain, the new track shall be faded in with its own (new) gain.
But with cross-fading, as said below in the code, the current_gain shall be retained to be applied on the old track piece while new gain is apply on the new track piece and the mix happens
Why did you revert to the old test then? I did test with the "corrected test" and fade-in, out and cross work as expected with expected replay gains
The text was updated successfully, but these errors were encountered: