From 2d831ae96852ed9474ad2dfbd338b914ce10ed2f Mon Sep 17 00:00:00 2001 From: Antoine C Date: Sun, 9 Jun 2024 18:44:15 +0100 Subject: [PATCH] Rewording RB multi threading to clarify the stereo split into mono --- .../bufferscalers/rubberbandwrapper.cpp | 17 ++++++++-- src/preferences/dialog/dlgprefsound.cpp | 31 ++++++++++++------- src/preferences/dialog/dlgprefsounddlg.ui | 3 -- 3 files changed, 34 insertions(+), 17 deletions(-) diff --git a/src/engine/bufferscalers/rubberbandwrapper.cpp b/src/engine/bufferscalers/rubberbandwrapper.cpp index aec0f0304f2..ede9a60a70f 100644 --- a/src/engine/bufferscalers/rubberbandwrapper.cpp +++ b/src/engine/bufferscalers/rubberbandwrapper.cpp @@ -14,8 +14,21 @@ namespace { /// The function is used to compute the best number of channel per RB task, /// depending of the number of channels and available worker. This allows /// hardware if will less than 8 core to adjust the task distribution in the -/// most optimum way. The following table provide the expected number of channel -/// per task when using multi threading globally. +/// most optimum way. +/// +/// The following table provide the expected number of channel per task with +/// stereo processing (the default behaviour) +/// +/// | NbOfCore | Stereo | Stem | +/// |----------|--------|------| +/// | 1 | 2 | 8 | +/// | 2 | 2 | 4 | +/// | 3 | 2 | 2 | +/// | 4 | 2 | 2 | +/// +/// The following table provide the expected number of channel per task when the +/// user has explicitly requested stereo channel to be processed as mono +/// channels. /// /// | NbOfCore | Stereo | Stem | /// |----------|--------|------| diff --git a/src/preferences/dialog/dlgprefsound.cpp b/src/preferences/dialog/dlgprefsound.cpp index f5faf4fb9d2..925f55f0dfe 100644 --- a/src/preferences/dialog/dlgprefsound.cpp +++ b/src/preferences/dialog/dlgprefsound.cpp @@ -37,17 +37,21 @@ bool soundItemAlreadyExists(const AudioPath& output, const QWidget& widget) { } #ifdef __RUBBERBAND__ -const QString kKeylockMultiThreadedAvailable = - QStringLiteral("

") + +const QString kKeylockMultiThreadedAvailable = QStringLiteral("

") + + QObject::tr( + "Distribute stereo channels into mono channels processed in " + "parallel.") + + QStringLiteral("

") + QObject::tr("Warning!") + QStringLiteral("

") + QObject::tr( - "Using multi " - "threading may result in pitch and tone imperfection, and this " + "Processing stereo signal as mono channel " + "may result in pitch and tone imperfection, and this " "is " "mono-incompatible, due to third party limitations.") + - QStringLiteral("\n") + + QStringLiteral("

") + QObject::tr( - "When disabled, multi threading will still be used on stem track if possible.") + + "Note that stem tracks will always be processed in parallel, " + "as individual stereo channels.") + QStringLiteral("

"); const QString kKeylockMultiThreadedUnavailableMono = QStringLiteral("") + QObject::tr( @@ -308,6 +312,7 @@ void DlgPrefSound::slotUpdate() { // for a prefs rewrite -- bkgood m_bSkipConfigClear = true; loadSettings(); + settingChanged(); checkLatencyCompensation(); m_bSkipConfigClear = false; m_settingsModified = false; @@ -760,12 +765,14 @@ void DlgPrefSound::updateKeylockMultithreading(bool enabled) { QMessageBox msg; msg.setIcon(QMessageBox::Warning); msg.setWindowTitle(tr("Are you sure?")); - msg.setText(QStringLiteral("

%1

%2

") - .arg(tr("Using multi threading result in a loss of " - "mono compatibility and a diffuse stereo " - "image. It is not recommended during " - "broadcasting or recording."), - tr("Are you sure you wish to proceed?"))); + msg.setText( + QStringLiteral("

%1

%2

") + .arg(tr("Distribute stereo channels into mono channels for " + "parallel processing will result in a loss of " + "mono compatibility and a diffuse stereo " + "image. It is not recommended during " + "broadcasting or recording."), + tr("Are you sure you wish to proceed?"))); QPushButton* pNoBtn = msg.addButton(tr("No"), QMessageBox::AcceptRole); QPushButton* pYesBtn = msg.addButton( tr("Yes, I know what I am doing"), QMessageBox::RejectRole); diff --git a/src/preferences/dialog/dlgprefsounddlg.ui b/src/preferences/dialog/dlgprefsounddlg.ui index ca0bebbd380..5ca5ac41712 100644 --- a/src/preferences/dialog/dlgprefsounddlg.ui +++ b/src/preferences/dialog/dlgprefsounddlg.ui @@ -231,9 +231,6 @@ 0 - - <html><head/><body><p><span style=" font-weight:600;">Warning!</span></p><p>Using multi threading may result in pitch and tone imperfaction depending of the platform, leading to mono-incompatibiltiy, due to third party limitations. </p><p><br/></p></body></html> - Multi-threaded