Skip to content

Commit

Permalink
Rewording RB multi threading to clarify the stereo split into mono
Browse files Browse the repository at this point in the history
  • Loading branch information
acolombier committed Jun 9, 2024
1 parent 0e61fec commit 2d831ae
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 17 deletions.
17 changes: 15 additions & 2 deletions src/engine/bufferscalers/rubberbandwrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
/// |----------|--------|------|
Expand Down
31 changes: 19 additions & 12 deletions src/preferences/dialog/dlgprefsound.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,21 @@ bool soundItemAlreadyExists(const AudioPath& output, const QWidget& widget) {
}

#ifdef __RUBBERBAND__
const QString kKeylockMultiThreadedAvailable =
QStringLiteral("<p><span style=\"font-weight:600;\">") +
const QString kKeylockMultiThreadedAvailable = QStringLiteral("<p>") +
QObject::tr(
"Distribute stereo channels into mono channels processed in "
"parallel.") +
QStringLiteral("</p><p><span style=\"font-weight:600;\">") +
QObject::tr("Warning!") + QStringLiteral("</span></p><p>") +
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("</p><p>") +
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("</p>");
const QString kKeylockMultiThreadedUnavailableMono = QStringLiteral("<i>") +
QObject::tr(
Expand Down Expand Up @@ -308,6 +312,7 @@ void DlgPrefSound::slotUpdate() {
// for a prefs rewrite -- bkgood
m_bSkipConfigClear = true;
loadSettings();
settingChanged();
checkLatencyCompensation();
m_bSkipConfigClear = false;
m_settingsModified = false;
Expand Down Expand Up @@ -760,12 +765,14 @@ void DlgPrefSound::updateKeylockMultithreading(bool enabled) {
QMessageBox msg;
msg.setIcon(QMessageBox::Warning);
msg.setWindowTitle(tr("Are you sure?"));
msg.setText(QStringLiteral("<p>%1</p><p>%2</p>")
.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("<p>%1</p><p>%2</p>")
.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);
Expand Down
3 changes: 0 additions & 3 deletions src/preferences/dialog/dlgprefsounddlg.ui
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,6 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Warning!&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Using multi threading may result in pitch and tone imperfaction depending of the platform, leading to mono-incompatibiltiy, due to third party limitations. &lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Multi-threaded</string>
</property>
Expand Down

0 comments on commit 2d831ae

Please sign in to comment.