diff --git a/libs/talcs b/libs/talcs index 283eae3..57ec5db 160000 --- a/libs/talcs +++ b/libs/talcs @@ -1 +1 @@ -Subproject commit 283eae3b162115d8127cb6344a811e64245281db +Subproject commit 57ec5db0db0afe48b1dec8ad3f91e74723a489ef diff --git a/src/plugins/audioplugin/CMakeLists.txt b/src/plugins/audioplugin/CMakeLists.txt index 37a5189..0d378c4 100644 --- a/src/plugins/audioplugin/CMakeLists.txt +++ b/src/plugins/audioplugin/CMakeLists.txt @@ -14,16 +14,18 @@ ck_add_plugin(${PROJECT_NAME} MACRO_PREFIX AUDIO ) -if(AUDIO_TEST) +if (AUDIO_TEST) target_compile_definitions(${PROJECT_NAME} PRIVATE AUDIO_TEST) +else() + list(FILTER _src EXCLUDE REGEX tests/) endif() # Configure target file(GLOB_RECURSE _src *.h *.cpp) qm_configure_target(${PROJECT_NAME} SOURCES ${_src} - QT_LINKS Core Gui Widgets - QT_INCLUDE_PRIVATE Core Gui Widgets + QT_LINKS Core Gui Widgets Test + QT_INCLUDE_PRIVATE Core Gui Widgets Test LINKS ChorusKit::AppCore svscraft::Widgets diff --git a/src/plugins/audioplugin/audio/audioexporter.cpp b/src/plugins/audioplugin/audio/exporter/audioexporter.cpp similarity index 64% rename from src/plugins/audioplugin/audio/audioexporter.cpp rename to src/plugins/audioplugin/audio/exporter/audioexporter.cpp index ae0ff04..79c0626 100644 --- a/src/plugins/audioplugin/audio/audioexporter.cpp +++ b/src/plugins/audioplugin/audio/exporter/audioexporter.cpp @@ -1,11 +1,19 @@ #include "audioexporter.h" #include "audioexporter_p.h" +#include "../../../coreplugin/windows/iprojectwindow.h" +#include +#include #include +#include +#include #include +#include + namespace Audio { + using namespace Internal; AudioExporterConfig::AudioExporterConfig() : d(new AudioExporterConfigData) { } @@ -29,6 +37,12 @@ namespace Audio { void AudioExporterConfig::setFileType(AudioExporterConfig::FileType a_) { d->fileType = a_; } + bool AudioExporterConfig::formatMono() const { + return d->formatMono; + } + void AudioExporterConfig::setFormatMono(bool a_) { + d->formatMono = a_; + } int AudioExporterConfig::formatOption() const { return d->formatOption; } @@ -83,6 +97,7 @@ namespace Audio { {"fileName", d->fileName}, {"fileDirectory", d->fileDirectory}, {"fileType", d->fileType}, + {"formatMono", d->formatMono}, {"formatOption", d->formatOption}, {"formatQuality", d->formatQuality}, {"formatSampleRate", d->formatSampleRate}, @@ -98,6 +113,7 @@ namespace Audio { config.d->fileName = map.value("fileName").toString(); config.d->fileDirectory = map.value("fileDirectory").toString(); config.d->fileType = static_cast(map.value("fileType").toInt()); + config.d->formatMono = map.value("formatMono").toBool(); config.d->formatOption = map.value("formatOption").toInt(); config.d->formatQuality = map.value("formatQuality").toInt(); config.d->formatSampleRate = map.value("formatSampleRate").toDouble(); @@ -109,6 +125,91 @@ namespace Audio { return config; } + QString AudioExporterPrivate::projectName() const { + // project file's base name + return QFileInfo(windowHandle->doc()->filePath()).baseName(); + } + QString AudioExporterPrivate::projectDirectory() const { + if (auto dir = QFileInfo(windowHandle->doc()->filePath()).dir(); dir.isRelative()) { + return QStandardPaths::standardLocations(QStandardPaths::DocumentsLocation).first(); + } else { + return dir.path(); + } + } + QString AudioExporterPrivate::trackName(int trackIndex) const { + return windowHandle->doc()->dataModel().model()->tracks()->at(trackIndex)->trackName(); + } + bool AudioExporterPrivate::calculateTemplate(QString &templateString) const { + return calculateTemplate(templateString, {}, -1); + } + bool AudioExporterPrivate::calculateTemplate(QString &templateString, const QString &trackName, + int trackIndex) const { + static QRegularExpression re(R"re(\$\{(.*?)\})re"); + bool allTemplatesMatch = true; + auto templateStringView = QStringView(templateString); + int pos = 0; + QString result; + for (auto matchIt = re.globalMatch(templateStringView); matchIt.hasNext(); matchIt.next()) { + auto match = matchIt.peekNext(); + auto templateName = match.captured(1); + auto replacedText = match.captured(0); + if (templateName == "projectName") { + replacedText = projectName(); + } else if (templateName == "sampleRate") { + replacedText = QString::number(config.formatSampleRate()); + } else if (templateName == "today") { + replacedText = QDate::currentDate().toString("yyyyMMdd"); + } else if (templateName == "$") { + replacedText = QStringLiteral("$"); + } else if (trackIndex != -1) { + if (templateName == "trackName") { + replacedText = trackName; + } else if (templateName == "trackIndex") { + replacedText = QString::number(trackIndex + 1); + } + } else { + allTemplatesMatch = false; + } + result += templateStringView.mid(pos, match.capturedStart(0) - pos); + result += replacedText; + pos = match.capturedEnd(0); + } + result += templateStringView.right(templateStringView.length() - pos); + templateString = result; + return allTemplatesMatch; + } + void AudioExporterPrivate::updateFileListAndWarnings() { + warning = {}; + if (config.fileType() == AudioExporterConfig::FT_Mp3 || config.fileType() == AudioExporterConfig::FT_OggVorbis) + warning |= AudioExporter::W_LossyFormat; + fileList.clear(); + if (config.sourceOption() == AudioExporterConfig::SO_All) { + auto calculatedFileName = config.fileName(); + if (!calculateTemplate(calculatedFileName)) + warning |= AudioExporter::W_UnrecognizedTemplate; + auto fileInfo = QFileInfo(QDir(projectDirectory()).absoluteFilePath(calculatedFileName)); + if (fileInfo.exists()) + warning |= AudioExporter::W_WillOverwrite; + fileList.append(fileInfo.canonicalFilePath()); + } else { + if (config.source().isEmpty()) + warning |= AudioExporter::W_NoFile; + QSet fileSet; + for (auto index : config.source()) { + auto calculatedFileName = config.fileName(); + if (!calculateTemplate(calculatedFileName, trackName(index), index)) + warning |= AudioExporter::W_UnrecognizedTemplate; + auto fileInfo = QFileInfo(QDir(projectDirectory()).absoluteFilePath(calculatedFileName)); + if (fileInfo.exists()) + warning |= AudioExporter::W_WillOverwrite; + if (fileSet.contains(fileInfo.canonicalFilePath())) + warning |= AudioExporter::W_DuplicatedFile; + fileSet.insert(fileInfo.canonicalFilePath()); + } + fileList.append(fileSet.values()); + } + } + AudioExporter::AudioExporter(Core::IProjectWindow *window, QObject *parent) : QObject(parent), d_ptr(new AudioExporterPrivate) { Q_D(AudioExporter); d->q_ptr = this; @@ -117,9 +218,7 @@ namespace Audio { AudioExporter::~AudioExporter() = default; QStringList AudioExporter::presets() { - auto &settings = *Core::ILoader::instance()->settings(); - const auto obj = settings["Audio"].toObject(); - return obj["audioExporterPresets"].toObject().keys(); + return AudioSettings::audioExporterPresets().toObject().keys(); } QList> AudioExporter::predefinedPresets() { @@ -212,35 +311,34 @@ namespace Audio { } AudioExporterConfig AudioExporter::preset(const QString &name) { - auto &settings = *Core::ILoader::instance()->settings(); - const auto obj = settings["Audio"].toObject(); - return AudioExporterConfig::fromVariantMap(obj["audioExporterPresets"][name].toObject().toVariantMap()); + return AudioExporterConfig::fromVariantMap(AudioSettings::audioExporterPresets()[name].toObject().toVariantMap()); } void AudioExporter::addPreset(const QString &name, const AudioExporterConfig &config) { - auto &settings = *Core::ILoader::instance()->settings(); - auto obj = settings["Audio"].toObject(); - auto presetsObj = obj["audioExporterPresets"].toObject(); + auto presetsObj = AudioSettings::audioExporterPresets().toObject(); presetsObj.insert(name, QJsonObject::fromVariantMap(config.toVariantMap())); - obj["audioExporterPresets"] = presetsObj; - settings["Audio"] = obj; + AudioSettings::setAudioExporterPresets(presetsObj); } bool AudioExporter::removePreset(const QString &name) { - auto &settings = *Core::ILoader::instance()->settings(); - auto obj = settings["Audio"].toObject(); - auto presetsObj = obj["audioExporterPresets"].toObject(); + auto presetsObj = AudioSettings::audioExporterPresets().toObject(); if (!presetsObj.contains(name)) return false; presetsObj.remove(name); - obj["audioExporterPresets"] = presetsObj; - settings["Audio"] = obj; + AudioSettings::setAudioExporterPresets(presetsObj); return true; } + static QList m_listeners; + + void AudioExporter::registerListener(AudioExporterListener *listener) { + m_listeners.append(listener); + } + void AudioExporter::setConfig(const AudioExporterConfig &config) { Q_D(AudioExporter); d->config = config; + d->updateFileListAndWarnings(); } AudioExporterConfig AudioExporter::config() const { Q_D(const AudioExporter); @@ -248,7 +346,8 @@ namespace Audio { } AudioExporter::Warning AudioExporter::warning() const { - return Audio::AudioExporter::Warning(); + Q_D(const AudioExporter); + return d->warning; } QStringList AudioExporter::warningText(AudioExporter::Warning warning) { @@ -272,10 +371,15 @@ namespace Audio { } QStringList AudioExporter::dryRun() const { - return QStringList(); + Q_D(const AudioExporter); + return d->fileList; + } + + AudioExporter::Result AudioExporter::exec() { + return {}; } - int AudioExporter::exec() { - return 0; + void AudioExporter::cancel(bool isFail) { + } } // Audio diff --git a/src/plugins/audioplugin/audio/audioexporter.h b/src/plugins/audioplugin/audio/exporter/audioexporter.h similarity index 85% rename from src/plugins/audioplugin/audio/audioexporter.h rename to src/plugins/audioplugin/audio/exporter/audioexporter.h index 68462a4..3367812 100644 --- a/src/plugins/audioplugin/audio/audioexporter.h +++ b/src/plugins/audioplugin/audio/exporter/audioexporter.h @@ -11,7 +11,6 @@ namespace Core { namespace Audio { class AudioExporterConfigData; - class AudioExporterPrivate; class AudioExporterConfig { @@ -34,6 +33,9 @@ namespace Audio { FileType fileType() const; void setFileType(FileType); + bool formatMono() const; + void setFormatMono(bool); + int formatOption() const; void setFormatOption(int); @@ -79,33 +81,44 @@ namespace Audio { QSharedDataPointer d; }; + class AudioExporterListener { + public: + virtual bool willStartCallback(Core::IProjectWindow *window) = 0; + virtual void willFinishCallback(Core::IProjectWindow *window) = 0; + }; + class AudioExporter : public QObject { Q_OBJECT Q_DECLARE_PRIVATE(AudioExporter) public: - enum WarningFlag { - W_NoFile = 0x0001, - W_DuplicatedFile = 0x0002, - W_WillOverwrite = 0x0004, - W_UnrecognizedTemplate = 0x0008, - W_LossyFormat = 0x00010, - }; - Q_DECLARE_FLAGS(Warning, WarningFlag) explicit AudioExporter(Core::IProjectWindow *window, QObject *parent = nullptr); ~AudioExporter() override; + Core::IProjectWindow *windowHandle() const; + [[nodiscard]] static QStringList presets(); [[nodiscard]] static QList> predefinedPresets(); [[nodiscard]] static AudioExporterConfig preset(const QString &name); static void addPreset(const QString &name, const AudioExporterConfig &config); static bool removePreset(const QString &name); + static void registerListener(AudioExporterListener *listener); + void setConfig(const AudioExporterConfig &config); AudioExporterConfig config() const; + enum WarningFlag { + W_NoFile = 0x0001, + W_DuplicatedFile = 0x0002, + W_WillOverwrite = 0x0004, + W_UnrecognizedTemplate = 0x0008, + W_LossyFormat = 0x00010, + }; + Q_DECLARE_FLAGS(Warning, WarningFlag) Warning warning() const; [[nodiscard]]static QStringList warningText(Warning warning); + QStringList dryRun() const; enum Result { @@ -113,7 +126,12 @@ namespace Audio { R_Fail, R_Abort, }; - int exec(); + Result exec(); + + void cancel(bool isFail = false); + + signals: + void progressChanged(int sourceIndex, double progressRatio); private: QScopedPointer d_ptr; diff --git a/src/plugins/audioplugin/audio/audioexporter_p.h b/src/plugins/audioplugin/audio/exporter/audioexporter_p.h similarity index 66% rename from src/plugins/audioplugin/audio/audioexporter_p.h rename to src/plugins/audioplugin/audio/exporter/audioexporter_p.h index 3c3a3d3..9c87f04 100644 --- a/src/plugins/audioplugin/audio/audioexporter_p.h +++ b/src/plugins/audioplugin/audio/exporter/audioexporter_p.h @@ -12,6 +12,7 @@ namespace Audio { QString fileName; QString fileDirectory; AudioExporterConfig::FileType fileType; + bool formatMono; int formatOption; int formatQuality; double formatSampleRate; @@ -28,6 +29,17 @@ namespace Audio { AudioExporter *q_ptr; AudioExporterConfig config; Core::IProjectWindow *windowHandle; + + QString projectName() const; + QString projectDirectory() const; + QString trackName(int trackIndex) const; + + bool calculateTemplate(QString &templateString) const; + bool calculateTemplate(QString &templateString, const QString &trackName, int trackIndex) const; + + AudioExporter::Warning warning; + QStringList fileList; + void updateFileListAndWarnings(); }; } diff --git a/src/plugins/audioplugin/internal/audioplugin.cpp b/src/plugins/audioplugin/internal/audioplugin.cpp index ce71923..d2c9370 100644 --- a/src/plugins/audioplugin/internal/audioplugin.cpp +++ b/src/plugins/audioplugin/internal/audioplugin.cpp @@ -35,6 +35,10 @@ #include #include +#ifdef AUDIO_TEST +# include +#endif + namespace Audio::Internal { AudioPlugin::AudioPlugin() { @@ -49,6 +53,11 @@ namespace Audio::Internal { auto splash = Core::InitRoutine::splash(); splash->showMessage(tr("Initializing audio plugin...")); +#ifdef AUDIO_TEST + auto iLoader = Core::ILoader::instance(); + iLoader->addObject("debug.UnitTest", new TestAudioExporterCalculateTemplate); +#endif + auto settings = Core::ILoader::instance()->settings(); if (!settings->contains("Audio")) settings->insert("Audio", QJsonObject()); @@ -101,8 +110,8 @@ namespace Audio::Internal { new DeviceTester(iAudio->outputSystemInterface(true), iAudio->outputSystemInterface(true)); new DeviceTester(iAudio->outputSystemInterface(false), iAudio->outputSystemInterface(false)); -// AudioExportDialog dlg; -// dlg.exec(); + AudioExportDialog dlg; + dlg.exec(); return true; } diff --git a/src/plugins/audioplugin/internal/dialogs/audioexportdialog.cpp b/src/plugins/audioplugin/internal/dialogs/audioexportdialog.cpp index f0b8473..bb7739c 100644 --- a/src/plugins/audioplugin/internal/dialogs/audioexportdialog.cpp +++ b/src/plugins/audioplugin/internal/dialogs/audioexportdialog.cpp @@ -1,5 +1,7 @@ #include "audioexportdialog.h" +#include + #include #include @@ -13,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -20,6 +23,7 @@ namespace Audio::Internal { AudioExportDialog::AudioExportDialog(QWidget *parent) : QDialog(parent) { setWindowTitle(tr("Export Audio")); + setWindowFlag(Qt::WindowContextHelpButtonHint, false); auto mainLayout = new QVBoxLayout; auto presetLayout = new QFormLayout; @@ -51,6 +55,26 @@ namespace Audio::Internal { fileNameTemplateButton->setIcon(style()->standardIcon(QStyle::SP_TitleBarMenuButton)); fileNameTemplateButton->setToolTip(tr("Template")); auto fileNameTemplateMenu = new QMenu(this); + fileNameTemplateMenu->addAction(QStringLiteral("${projectName}"), this, [=] { + QFileInfo fileInfo(m_fileNameEdit->text()); + m_fileNameEdit->setText(fileInfo.baseName() + QStringLiteral("${projectName}.") + fileInfo.completeSuffix()); + }); + fileNameTemplateMenu->addAction(QStringLiteral("${sampleRate}"), this, [=] { + QFileInfo fileInfo(m_fileNameEdit->text()); + m_fileNameEdit->setText(fileInfo.baseName() + QStringLiteral("${sampleRate}.") + fileInfo.completeSuffix()); + }); + fileNameTemplateMenu->addAction(QStringLiteral("${today}"), this, [=] { + QFileInfo fileInfo(m_fileNameEdit->text()); + m_fileNameEdit->setText(fileInfo.baseName() + QStringLiteral("${today}.") + fileInfo.completeSuffix()); + }); + auto fileNameTemplateTrackNameAction = fileNameTemplateMenu->addAction(QStringLiteral("${trackName}"), this, [=] { + QFileInfo fileInfo(m_fileNameEdit->text()); + m_fileNameEdit->setText(fileInfo.baseName() + QStringLiteral("${trackName}.") + fileInfo.completeSuffix()); + }); + auto fileNameTemplateTrackIndexAction = fileNameTemplateMenu->addAction(QStringLiteral("${trackIndex}"), this, [=] { + QFileInfo fileInfo(m_fileNameEdit->text()); + m_fileNameEdit->setText(fileInfo.baseName() + QStringLiteral("${trackIndex}.") + fileInfo.completeSuffix()); + }); fileNameTemplateButton->setMenu(fileNameTemplateMenu); fileNameLayout->addWidget(fileNameTemplateButton); auto fileNameTemplateContextHelpButton = new QPushButton; @@ -75,11 +99,9 @@ namespace Audio::Internal { pathLayout->addRow(nameLabel, fileNameLayout); m_fileDirectoryEdit = new QLineEdit; m_fileDirectoryEdit->setPlaceholderText(tr("(Project directory)")); - pathLayout->addRow(tr("&Directory"), m_fileDirectoryEdit); + pathLayout->addRow(tr("Dire&ctory"), m_fileDirectoryEdit); m_fileTypeComboBox = new QComboBox; - - // TODO Audio formats - + m_fileTypeComboBox->addItems({tr("WAV"), tr("FLAC"), tr("Ogg Vorbis"), tr("MP3")}); pathLayout->addRow(tr("&Type"), m_fileTypeComboBox); pathGroupBox->setLayout(pathLayout); leftLayout->addWidget(pathGroupBox); @@ -87,10 +109,23 @@ namespace Audio::Internal { auto formatGroupBox = new QGroupBox(tr("Format")); auto formatLayout = new QFormLayout; + m_formatMonoComboBox = new QComboBox; + m_formatMonoComboBox->addItems({tr("Mono"), tr("Stereo")}); + formatLayout->addRow(tr("C&hannel"), m_formatMonoComboBox); m_formatOptionComboBox = new QComboBox; formatLayout->addRow(tr("&Option"), m_formatOptionComboBox); + auto vbrLayout = new QHBoxLayout; m_vbrSlider = new QSlider(Qt::Horizontal); - formatLayout->addRow(tr("&Quality"), m_vbrSlider); + m_vbrSlider->setRange(0, 100); + vbrLayout->addWidget(m_vbrSlider); + auto vbrSpinBox = new SVS::ExpressionSpinBox; + vbrSpinBox->setRange(0, 100); + vbrLayout->addWidget(vbrSpinBox); + connect(vbrSpinBox, QOverload::of(&QSpinBox::valueChanged), m_vbrSlider, &QSlider::valueChanged); + connect(m_vbrSlider, &QSlider::valueChanged, vbrSpinBox, &QSpinBox::setValue); + auto vbrLabel = new QLabel(tr("&Quality")); + vbrLabel->setBuddy(vbrSpinBox); + formatLayout->addRow(vbrLabel, vbrLayout); m_formatSampleRateComboBox = new QComboBox; m_formatSampleRateComboBox->setEditable(true); m_formatSampleRateComboBox->setValidator(new QDoubleValidator(0.01, std::numeric_limits::max(), 2)); @@ -109,6 +144,8 @@ namespace Audio::Internal { tr("Separated"), tr("Separated (through master track)"), }); + connect(m_mixingOptionComboBox, QOverload::of(&QComboBox::currentIndexChanged), fileNameTemplateTrackNameAction, &QAction::setEnabled); + connect(m_mixingOptionComboBox, QOverload::of(&QComboBox::currentIndexChanged), fileNameTemplateTrackIndexAction, &QAction::setEnabled); mixingLayout->addRow(tr("&Mixing Option"), m_mixingOptionComboBox); m_enableMuteSoloCheckBox = new QCheckBox(tr("Enable m&ute/solo")); m_enableMuteSoloCheckBox->setChecked(true); @@ -129,7 +166,7 @@ namespace Audio::Internal { auto timeRangeGroupBox = new QGroupBox(tr("Time Range")); auto timeRangeLayout = new QVBoxLayout; - auto rangeOptionLayout = new QVBoxLayout; + auto rangeOptionLayout = new QHBoxLayout; m_rangeSelectAllRadio = new QRadioButton(tr("A&ll")); m_rangeSelectAllRadio->setChecked(true); rangeOptionLayout->addWidget(m_rangeSelectAllRadio); @@ -169,6 +206,8 @@ namespace Audio::Internal { mainLayout->addLayout(buttonLayout); setLayout(mainLayout); + + resize(600, 800); } AudioExportDialog::~AudioExportDialog() { } diff --git a/src/plugins/audioplugin/internal/dialogs/audioexportdialog.h b/src/plugins/audioplugin/internal/dialogs/audioexportdialog.h index c3af645..2650ae2 100644 --- a/src/plugins/audioplugin/internal/dialogs/audioexportdialog.h +++ b/src/plugins/audioplugin/internal/dialogs/audioexportdialog.h @@ -27,6 +27,7 @@ namespace Audio::Internal { QLineEdit *m_fileDirectoryEdit; QLineEdit *m_fileNameEdit; QComboBox *m_fileTypeComboBox; + QComboBox *m_formatMonoComboBox; QComboBox *m_formatOptionComboBox; QSlider *m_vbrSlider; QComboBox *m_formatSampleRateComboBox; diff --git a/src/plugins/audioplugin/internal/tests/TestAudioExporterCalculateTemplate.h b/src/plugins/audioplugin/internal/tests/TestAudioExporterCalculateTemplate.h new file mode 100644 index 0000000..9a1f6de --- /dev/null +++ b/src/plugins/audioplugin/internal/tests/TestAudioExporterCalculateTemplate.h @@ -0,0 +1,28 @@ +#ifndef AUDIO_TESTAUDIOEXPORTERCALCULATETEMPLATE_H +#define AUDIO_TESTAUDIOEXPORTERCALCULATETEMPLATE_H + +#include + + +#include + +namespace Audio::Internal { + class TestAudioExporterCalculateTemplate : public QObject { + Q_OBJECT + public: + explicit TestAudioExporterCalculateTemplate(QObject *parent = nullptr) : QObject(parent) { + } + private slots: + void testCalculateTemplate() { + AudioExporterPrivate d; + QString s = "aaa${trackName}bbb${trackIndex}ccc"; + QVERIFY(d.calculateTemplate(s, "xxx", 1)); + QCOMPARE(s, "aaaxxxbbb1ccc"); + s = "aaa${trackName}bbb${trackIndex}ccc"; + QVERIFY(!d.calculateTemplate(s)); + QCOMPARE(s, "aaa${trackName}bbb${trackIndex}ccc"); + } + }; +} + +#endif //AUDIO_TESTAUDIOEXPORTERCALCULATETEMPLATE_H diff --git a/src/plugins/audioplugin/internal/utils/audiosettings.cpp b/src/plugins/audioplugin/internal/utils/audiosettings.cpp index 709e577..06a95d3 100644 --- a/src/plugins/audioplugin/internal/utils/audiosettings.cpp +++ b/src/plugins/audioplugin/internal/utils/audiosettings.cpp @@ -115,5 +115,8 @@ namespace Audio::Internal { AUDIO_AUDIO_SETTINGS_OPTION_IMPLEMENTATION_1(vstPluginEditorUsesCustomTheme, setVstPluginEditorUsesCustomTheme) AUDIO_AUDIO_SETTINGS_OPTION_IMPLEMENTATION_2(vstPluginPort, setVstPluginPort, 28082) AUDIO_AUDIO_SETTINGS_OPTION_IMPLEMENTATION_QJSONVALUE(vstTheme, setVstTheme) + + AUDIO_AUDIO_SETTINGS_OPTION_IMPLEMENTATION_QJSONVALUE(audioExporterPresets, setAudioExporterPresets) + AUDIO_AUDIO_SETTINGS_OPTION_IMPLEMENTATION_1(audioExporterClippingCheckEnabled, setAudioExporterClippingCheckEnabled) } // Audio \ No newline at end of file diff --git a/src/plugins/audioplugin/internal/utils/audiosettings.h b/src/plugins/audioplugin/internal/utils/audiosettings.h index d7a875a..ecc4c09 100644 --- a/src/plugins/audioplugin/internal/utils/audiosettings.h +++ b/src/plugins/audioplugin/internal/utils/audiosettings.h @@ -49,6 +49,9 @@ namespace Audio::Internal { AUDIO_AUDIO_SETTINGS_OPTION_DECLARATION(vstPluginPort, setVstPluginPort, int) AUDIO_AUDIO_SETTINGS_OPTION_DECLARATION(vstTheme, setVstTheme, QJsonValue) + AUDIO_AUDIO_SETTINGS_OPTION_DECLARATION(audioExporterPresets, setAudioExporterPresets, QJsonValue) + AUDIO_AUDIO_SETTINGS_OPTION_DECLARATION(audioExporterClippingCheckEnabled, setAudioExporterClippingCheckEnabled, bool) + }; }