UI: Add option to use percent instead of dB
This commit is contained in:
committed by
jp9000
parent
c25d53c418
commit
a2298f3f94
@@ -4,6 +4,7 @@
|
||||
#include <QWidget>
|
||||
#include <QPointer>
|
||||
#include <QDoubleSpinBox>
|
||||
#include <QStackedWidget>
|
||||
#include "balance-slider.hpp"
|
||||
|
||||
class QGridLayout;
|
||||
@@ -12,6 +13,11 @@ class QSpinBox;
|
||||
class QCheckBox;
|
||||
class QComboBox;
|
||||
|
||||
enum class VolumeType {
|
||||
dB,
|
||||
Percent,
|
||||
};
|
||||
|
||||
class OBSAdvAudioCtrl : public QObject {
|
||||
Q_OBJECT
|
||||
|
||||
@@ -23,6 +29,8 @@ private:
|
||||
QPointer<QWidget> balanceContainer;
|
||||
|
||||
QPointer<QLabel> nameLabel;
|
||||
QPointer<QStackedWidget> stackedWidget;
|
||||
QPointer<QSpinBox> percent;
|
||||
QPointer<QDoubleSpinBox> volume;
|
||||
QPointer<QCheckBox> forceMono;
|
||||
QPointer<BalanceSlider> balance;
|
||||
@@ -54,6 +62,8 @@ public:
|
||||
inline obs_source_t *GetSource() const { return source; }
|
||||
void ShowAudioControl(QGridLayout *layout);
|
||||
|
||||
void SetVolumeWidget(VolumeType type);
|
||||
|
||||
public slots:
|
||||
void SourceFlagsChanged(uint32_t flags);
|
||||
void SourceVolumeChanged(float volume);
|
||||
@@ -61,6 +71,7 @@ public slots:
|
||||
void SourceMixersChanged(uint32_t mixers);
|
||||
|
||||
void volumeChanged(double db);
|
||||
void percentChanged(int percent);
|
||||
void downmixMonoChanged(bool checked);
|
||||
void balanceChanged(int val);
|
||||
void syncOffsetChanged(int milliseconds);
|
||||
|
Reference in New Issue
Block a user