-
-
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
Fill sidechainMix from external sidechain input. This fixes lp1876222 #2743
Conversation
src/engine/enginemaster.cpp
Outdated
@@ -665,8 +669,7 @@ void EngineMaster::process(const int iBufferSize) { | |||
// If recording/broadcasting from a sound card input, | |||
// SoundManager will send the input buffer from the sound card to m_pSidechain | |||
// so skip sending a buffer to m_pSidechain here. |
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.
Please, also update the comment, since now it is no longer valid
Done. |
src/engine/enginemaster.cpp
Outdated
// passing samples to the network reads directly from m_pSidechainMix. | ||
// If recording/broadcasting from a sound card input. | ||
// Note: In case the broadcast/recording input is configured, | ||
// SoundManager has copied the input buffer to m_pSidechainMix before. |
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.
Seems the "If recording/broadcasting from a sound card input." line is not needed now.
Also, it might be confusing to say that SoundManager has copied the input buffer.
The copy happens on EngineSideChain::receiveBuffer, when called SoundManager::pushInputBuffers when called from SoundDeviceNetwork::readProcess when called from SoundManager::readProcess() when called from SoundDevicePortAudio::callbackProcessClkRef". So, maybe mention at least pushInputBuffers.
And if you want, you might also mention that "the network reads directly from m_pSideChainMix registering it with SoundDevice::addOutput()"
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.
change the if to copy buffer on lines 566 and 603 too.
src/engine/enginemaster.cpp
Outdated
@@ -632,7 +634,8 @@ void EngineMaster::process(const int iBufferSize) { | |||
SampleUtil::applyRampingGain(m_pMaster, m_masterGainOld, | |||
master_gain, m_iBufferSize); | |||
m_masterGainOld = master_gain; | |||
if (!m_bExternalRecordBroadcastInputConnected) { | |||
if (m_pEngineSideChain && | |||
!m_bExternalRecordBroadcastInputConnected) { |
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.
Oh, I just realised that this if/copy is also done on line 566 and 603. You need to modify those too.
OK, done. |
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.
LGTM.
Done. |
@@ -17,6 +17,7 @@ | |||
* Add controller mapping for Hercules DJControl Inpulse 300 #2465 | |||
* Add controller mapping for Denon MC7000 #2546 | |||
* Add controller mapping for Stanton DJC.4 #2607 | |||
* Fix broadcasting via broadcast/recording input lp:1876222 #2743 |
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.
* Fix broadcasting via broadcast/recording input lp:1876222 #2743 | |
* Fix broadcasting via Record/Broadcast input lp:1876222 #2743 |
to match the GUI in the Sound Hardware Preferences
if (!m_bExternalRecordBroadcastInputConnected | ||
&& m_pEngineSideChain != nullptr) { | ||
// Submit buffer to the side chain to do CPU intensive non-realtime | ||
// tasks like recording. The SoundDeviceNetwork, responsible for |
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.
// tasks like recording. The SoundDeviceNetwork, responsible for | |
// tasks (recording and broadcasting). The SoundDeviceNetwork, responsible for |
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.
Currently (i.e. with this PR), SideChain is not used for broadcasting, only the pSidechainMix
Done. |
What is the status of this? Ready for merge? |
Yes. |
Did this ever work? Now it finally does. :-)
The issue was, that the buffer used from the engine to the soundDeviceNetwork was not filled.