Skip to content

Commit

Permalink
macsynth backend fixes for ticket #16
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrolcl committed Dec 16, 2023
1 parent 7933d55 commit 6b0819d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
12 changes: 11 additions & 1 deletion library/rt-backends/macsynth/macsynth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ namespace rt {
AUGraph m_graph;
AudioUnit m_synthUnit;
MIDIConnection m_connection;
public:
QString m_soundfont_dls;
bool m_default_dls;
bool m_reverb_dls;
public:
bool m_status;
QStringList m_diagnostics;

Expand Down Expand Up @@ -396,6 +396,16 @@ namespace rt {
d->sendStatusEvent(static_cast<unsigned>(status), 0, 0);
}

void MacSynthOutput::writeSettings(QSettings *settings)
{
settings->beginGroup("DLS Synth");
settings->setValue("soundfont_dls", d->m_soundfont_dls);
settings->setValue("reverb_dls", d->m_reverb_dls);
settings->setValue("default_dls", d->m_default_dls);
settings->endGroup();
settings->sync();
}

QStringList MacSynthOutput::getDiagnostics()
{
return d->m_diagnostics;
Expand Down
4 changes: 3 additions & 1 deletion library/rt-backends/macsynth/macsynth.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ namespace rt {
virtual void close();
virtual MIDIConnection currentConnection();

public slots:
public Q_SLOTS:
virtual void sendNoteOff(int chan, int note, int vel);
virtual void sendNoteOn(int chan, int note, int vel);
virtual void sendKeyPressure(int chan, int note, int value);
Expand All @@ -61,6 +61,8 @@ namespace rt {
virtual void sendSysex(const QByteArray &data);
virtual void sendSystemMsg(const int status);

void writeSettings(QSettings *settings);

private:
class MacSynthOutputPrivate;
MacSynthOutputPrivate* const d;
Expand Down
2 changes: 1 addition & 1 deletion library/widgets/macsynthsettingsdialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class MacSynthSettingsDialog : public QDialog
void writeSettings();
void changeSoundFont(const QString& fileName);

public slots:
public Q_SLOTS:
void accept() override;
void showEvent(QShowEvent *event) override;
void restoreDefaults();
Expand Down

0 comments on commit 6b0819d

Please sign in to comment.