-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Test: fix mic Auto ducking #2634
Conversation
double talkOvergain = 1.0; | ||
if (!m_activeTalkoverChannels.isEmpty()) { | ||
talkOvergain = m_pTalkoverDucking->getGain(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
m_activeTalkoverChannels is cleared and then populated in processChannels() which is called a few lines above, so I guess it's correct to use it for checking if any talkover is enabled?
case EngineTalkoverDucking::AUTO: | ||
return calculateCompressedGain(numFrames); | ||
case EngineTalkoverDucking::MANUAL: | ||
} else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... or should I use the switch like before, simply return m_pDuckStrength->get() for Auto and Manual and keep the warning in place?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change means that auto is no longer auto, it's just using the manual setting. The point of auto is that it's supposed to pick a good level to compress the audio to. If it's picking bad numbers, then we need to fix calculateCompressedGain
can you explain what was broken about the code before? I'm not sure I understand the fix |
see https://bugs.launchpad.net/mixxx/+bug/1737113 This fixes it. |
@ywwg Sorry for the confusion. Looks like I cleaned up too much before pushing last night, I was focused just on the Auto mode last night. Still, this is ust a test. In the beginning I thought enginetalkoverducking.cpp could take care of checking for active talkover, but the additional includes and passing channels/groups around seemed too complicated for that simple purpose. |
Think I found the root issue: the Strength knob effect depends on the mode.
|
@ywwg Besides, I think it would also be appreciated to have an Auto mode that engages ducking when Talk is pressed: you could have a small pause with low music before the voice comes in, compared to the existing Auto mode which -by it's nature- always overlaps music and voice a bit. |
Ups, I was not aware that his branch exists. Sorry. |
Jup, closing this is correct. Actually it was just me starting to poke around in the Mic engine code and was superseeded by our latest mic fixes. |
https://bugs.launchpad.net/mixxx/+bug/1737113
"Manual duck not works"
maybe also https://bugs.launchpad.net/mixxx/+bug/1662536
"Manual Ducking inconsistent behavior"
I'm sure this fix is not the most efficient solution as I'm not very much into the engine code.
First I'd like to check if I got the concept right, after that please comment how the code can be improved.
The Ducking Mode toolip says
Off: Do not reduce music volume
Auto: Automatically reduce music volume when microphones are in use. Adjust the amount the music volume is reduced with the Strength knob.
Manual: Reduce music volume by a fixed amount set by the Strength knob
So Auto mode should reduce the music volume if any Mic Talkover button is pressed?
First I looked at EngineTalkoverDucking::getGain because this is what is called from EngineMaster::process to adjust the master gain. With AUTO mode, this does some compression calculation that seems to depend on the Mic level but hardly returns values below 0.9, even if I crank up the Mic pregain to make the Mic input clip. So, hardly any effect on master gain.