19#ifndef FLUIDSETTINGSDIALOG_H
20#define FLUIDSETTINGSDIALOG_H
40 class FluidSettingsDialog;
43class FluidSettingsDialog :
public QDialog
48 explicit FluidSettingsDialog(QWidget *parent =
nullptr);
49 ~FluidSettingsDialog();
53 void chkDriverProperties(
QSettings* settings);
54 void setWidgetTip(QWidget *w,
const QString &tip);
57 void accept()
override;
58 void showEvent(QShowEvent *event)
override;
59 void restoreDefaults();
60 void showFileDialog();
61 void audioDriverChanged(
const QString &text);
62 void bufferTimeChanged(
int value);
63 void bufferSizeChanged();
66 static const QString QSTR_PREFERENCES;
67 static const QString QSTR_INSTRUMENTSDEFINITION;
68 static const QString QSTR_DATADIR;
69 static const QString QSTR_DATADIR2;
70 static const QString QSTR_AUDIODRIVER;
71 static const QString QSTR_PERIODSIZE;
72 static const QString QSTR_PERIODS;
73 static const QString QSTR_SAMPLERATE;
74 static const QString QSTR_CHORUS;
75 static const QString QSTR_REVERB;
76 static const QString QSTR_GAIN;
77 static const QString QSTR_POLYPHONY;
78 static const QString QSTR_BUFFERTIME;
80 static const QString QSTR_CHORUS_DEPTH;
81 static const QString QSTR_CHORUS_LEVEL;
82 static const QString QSTR_CHORUS_NR;
83 static const QString QSTR_CHORUS_SPEED;
84 static const QString QSTR_REVERB_DAMP;
85 static const QString QSTR_REVERB_LEVEL;
86 static const QString QSTR_REVERB_SIZE;
87 static const QString QSTR_REVERB_WIDTH;
89 static const int DEFAULT_BUFFERTIME = 50;
90 static const int DEFAULT_PERIODSIZE = 512;
91 static const int DEFAULT_PERIODS = 8;
92 static constexpr double DEFAULT_SAMPLERATE = 44100.0;
93 static const int DEFAULT_CHORUS = 1;
94 static const int DEFAULT_REVERB = 1;
95 static constexpr double DEFAULT_GAIN = 1.0;
96 static const int DEFAULT_POLYPHONY = 256;
97 static const QString QSTR_PULSEAUDIO;
99 static constexpr qreal DEFAULT_CHORUS_DEPTH = 4.25;
100 static constexpr qreal DEFAULT_CHORUS_LEVEL = 0.60;
101 static constexpr int DEFAULT_CHORUS_NR = 3;
102 static constexpr qreal DEFAULT_CHORUS_SPEED = 0.20;
104 static constexpr qreal DEFAULT_REVERB_DAMP = 0.30;
105 static constexpr qreal DEFAULT_REVERB_LEVEL = 0.70;
106 static constexpr qreal DEFAULT_REVERB_SIZE = 0.50;
107 static constexpr qreal DEFAULT_REVERB_WIDTH = 0.80;
109 static constexpr qreal CHORUS_REVERB_VALUE_SCALE = 100.0;
112 QString defaultAudioDriver()
const;
113 bool checkRanges()
const;
115 QString driverVersion()
const;
116 bool driverVersionLessThan_2_2_8();
118 Ui::FluidSettingsDialog *ui;
120 QString m_defSoundFont;
The QSettings class provides persistent platform-independent application settings.