Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into abletonlink
Browse files Browse the repository at this point in the history
  • Loading branch information
JoergAtGithub committed Oct 15, 2023
1 parent 2e829da commit f7e87fb
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 49 deletions.
94 changes: 47 additions & 47 deletions src/engine/enginemixer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ void EngineMixer::process(const int iBufferSize,
ChannelMixer::applyEffectsInPlaceAndMixChannels(m_mainGain,
m_activeBusChannels[o],
&m_channelMainGainCache, // no [o] because the old gain
// follows an orientation switch
// follows an orientation switch
m_outputBusBuffers[o].data(),
m_mainHandle.handle(),
iBufferSize,
Expand Down Expand Up @@ -980,98 +980,98 @@ void EngineMixer::onOutputConnected(const AudioOutput& output) {
case AudioPathType::Main:
// overwrite config option if a main output is configured
m_pMainEnabled->forceSet(1.0);
break;
break;
case AudioPathType::Headphones:
m_pMainEnabled->forceSet(1.0);
m_pHeadphoneEnabled->forceSet(1.0);
break;
m_pHeadphoneEnabled->forceSet(1.0);
break;
case AudioPathType::Booth:
m_pMainEnabled->forceSet(1.0);
m_pBoothEnabled->forceSet(1.0);
break;
m_pBoothEnabled->forceSet(1.0);
break;
case AudioPathType::Bus:
m_bBusOutputConnected[output.getIndex()] = true;
break;
m_bBusOutputConnected[output.getIndex()] = true;
break;
case AudioPathType::Deck:
// We don't track enabled decks.
break;
// We don't track enabled decks.
break;
case AudioPathType::RecordBroadcast:
// We don't track enabled sidechain.
break;
default:
break;
// We don't track enabled sidechain.
break;
default:
break;
}
}

void EngineMixer::onOutputDisconnected(const AudioOutput& output) {
switch (output.getType()) {
case AudioPathType::Main:
// not used, because we need the main buffer for headphone mix
// and recording/broadcasting as well
break;
// and recording/broadcasting as well
break;
case AudioPathType::Booth:
m_pBoothEnabled->forceSet(0.0);
break;
m_pBoothEnabled->forceSet(0.0);
break;
case AudioPathType::Headphones:
m_pHeadphoneEnabled->forceSet(0.0);
break;
m_pHeadphoneEnabled->forceSet(0.0);
break;
case AudioPathType::Bus:
m_bBusOutputConnected[output.getIndex()] = false;
break;
m_bBusOutputConnected[output.getIndex()] = false;
break;
case AudioPathType::Deck:
// We don't track enabled decks.
break;
// We don't track enabled decks.
break;
case AudioPathType::RecordBroadcast:
// We don't track enabled sidechain.
break;
default:
break;
// We don't track enabled sidechain.
break;
default:
break;
}
}

void EngineMixer::onInputConnected(const AudioInput& input) {
switch (input.getType()) {
case AudioPathType::Microphone:
m_numMicsConfigured++;
break;
break;
case AudioPathType::Auxiliary:
// We don't track enabled auxiliary inputs.
break;
// We don't track enabled auxiliary inputs.
break;
case AudioPathType::VinylControl:
// We don't track enabled vinyl control inputs.
break;
// We don't track enabled vinyl control inputs.
break;
case AudioPathType::RecordBroadcast:
m_bExternalRecordBroadcastInputConnected = true;
break;
default:
break;
m_bExternalRecordBroadcastInputConnected = true;
break;
default:
break;
}
}

void EngineMixer::onInputDisconnected(const AudioInput& input) {
switch (input.getType()) {
case AudioPathType::Microphone:
m_numMicsConfigured--;
break;
break;
case AudioPathType::Auxiliary:
// We don't track enabled auxiliary inputs.
break;
// We don't track enabled auxiliary inputs.
break;
case AudioPathType::VinylControl:
// We don't track enabled vinyl control inputs.
break;
// We don't track enabled vinyl control inputs.
break;
case AudioPathType::RecordBroadcast:
m_bExternalRecordBroadcastInputConnected = false;
break;
default:
break;
m_bExternalRecordBroadcastInputConnected = false;
break;
default:
break;
}
}

void EngineMixer::registerNonEngineChannelSoundIO(SoundManager* pSoundManager) {
pSoundManager->registerInput(AudioInput(AudioPathType::RecordBroadcast,
0,
mixxx::audio::ChannelCount::stereo()),
m_pEngineSideChain);
m_pEngineSideChain);

pSoundManager->registerOutput(AudioOutput(AudioPathType::Main,
0,
Expand Down
2 changes: 1 addition & 1 deletion src/soundio/soundmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ SoundDeviceStatus SoundManager::setConfig(const SoundManagerConfig& config) {
// certain parts of mixxx rely on this being here, for the time being, just
// letting those be -- bkgood
// Do this first so vinyl control gets the right samplerate -- Owen W.
m_pConfig->set(ConfigKey("[Soundcard]","Samplerate"),
m_pConfig->set(ConfigKey("[Soundcard]", "Samplerate"),
ConfigValue(static_cast<int>(m_config.getSampleRate().value())));

status = setupDevices();
Expand Down
2 changes: 1 addition & 1 deletion src/test/enginemixertest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class EngineMixerTest : public BaseSignalPathTest {
void assertHeadphoneBufferMatchesGolden(const QString& testName) {
assertBufferMatchesReference(m_pEngineMixer->getHeadphoneBuffer(),
kMaxEngineSamples,
QString("%1-headphone").arg(testName));
QString("%1-headphone").arg(testName));
};
};

Expand Down

0 comments on commit f7e87fb

Please sign in to comment.