2014-12-28 00:38:00 -08:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <obs.hpp>
|
|
|
|
#include <QWidget>
|
2015-02-11 07:49:12 -08:00
|
|
|
#include <QPointer>
|
2018-09-02 20:17:09 -07:00
|
|
|
#include "balance-slider.hpp"
|
2014-12-28 00:38:00 -08:00
|
|
|
|
2015-02-11 07:49:12 -08:00
|
|
|
class QGridLayout;
|
2014-12-28 00:38:00 -08:00
|
|
|
class QLabel;
|
|
|
|
class QSpinBox;
|
|
|
|
class QCheckBox;
|
2017-02-05 21:51:50 -08:00
|
|
|
class QComboBox;
|
2014-12-28 00:38:00 -08:00
|
|
|
|
2015-02-11 07:49:12 -08:00
|
|
|
class OBSAdvAudioCtrl : public QObject {
|
2014-12-28 00:38:00 -08:00
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
private:
|
|
|
|
OBSSource source;
|
2015-02-11 07:49:12 -08:00
|
|
|
|
|
|
|
QPointer<QWidget> forceMonoContainer;
|
|
|
|
QPointer<QWidget> mixerContainer;
|
2017-10-08 03:15:28 -07:00
|
|
|
QPointer<QWidget> balanceContainer;
|
2015-02-11 07:49:12 -08:00
|
|
|
|
|
|
|
QPointer<QLabel> nameLabel;
|
|
|
|
QPointer<QSpinBox> volume;
|
|
|
|
QPointer<QCheckBox> forceMono;
|
2018-09-02 20:17:09 -07:00
|
|
|
QPointer<BalanceSlider>balance;
|
2015-02-11 07:49:12 -08:00
|
|
|
QPointer<QLabel> labelL;
|
|
|
|
QPointer<QLabel> labelR;
|
|
|
|
QPointer<QSpinBox> syncOffset;
|
2017-02-05 21:51:50 -08:00
|
|
|
QPointer<QComboBox> monitoringType;
|
2015-02-11 07:49:12 -08:00
|
|
|
QPointer<QCheckBox> mixer1;
|
|
|
|
QPointer<QCheckBox> mixer2;
|
|
|
|
QPointer<QCheckBox> mixer3;
|
|
|
|
QPointer<QCheckBox> mixer4;
|
2016-12-21 17:14:24 -08:00
|
|
|
QPointer<QCheckBox> mixer5;
|
|
|
|
QPointer<QCheckBox> mixer6;
|
2014-12-28 00:38:00 -08:00
|
|
|
|
|
|
|
OBSSignal volChangedSignal;
|
|
|
|
OBSSignal syncOffsetSignal;
|
|
|
|
OBSSignal flagsSignal;
|
2015-01-16 09:08:57 -08:00
|
|
|
OBSSignal mixersSignal;
|
2014-12-28 00:38:00 -08:00
|
|
|
|
|
|
|
static void OBSSourceFlagsChanged(void *param, calldata_t *calldata);
|
|
|
|
static void OBSSourceVolumeChanged(void *param, calldata_t *calldata);
|
|
|
|
static void OBSSourceSyncChanged(void *param, calldata_t *calldata);
|
2015-01-16 09:08:57 -08:00
|
|
|
static void OBSSourceMixersChanged(void *param, calldata_t *calldata);
|
2014-12-28 00:38:00 -08:00
|
|
|
|
|
|
|
public:
|
2015-02-11 07:49:12 -08:00
|
|
|
OBSAdvAudioCtrl(QGridLayout *layout, obs_source_t *source_);
|
|
|
|
virtual ~OBSAdvAudioCtrl();
|
2014-12-28 00:38:00 -08:00
|
|
|
|
|
|
|
inline obs_source_t *GetSource() const {return source;}
|
2018-03-18 08:29:13 -07:00
|
|
|
void ShowAudioControl(QGridLayout *layout);
|
2014-12-28 00:38:00 -08:00
|
|
|
|
|
|
|
public slots:
|
|
|
|
void SourceFlagsChanged(uint32_t flags);
|
|
|
|
void SourceVolumeChanged(float volume);
|
|
|
|
void SourceSyncChanged(int64_t offset);
|
2015-01-16 09:08:57 -08:00
|
|
|
void SourceMixersChanged(uint32_t mixers);
|
2014-12-28 00:38:00 -08:00
|
|
|
|
|
|
|
void volumeChanged(int percentage);
|
|
|
|
void downmixMonoChanged(bool checked);
|
2017-10-08 03:15:28 -07:00
|
|
|
void balanceChanged(int val);
|
2014-12-28 00:38:00 -08:00
|
|
|
void syncOffsetChanged(int milliseconds);
|
2017-02-05 21:51:50 -08:00
|
|
|
void monitoringTypeChanged(int index);
|
2015-01-16 07:58:13 -08:00
|
|
|
void mixer1Changed(bool checked);
|
|
|
|
void mixer2Changed(bool checked);
|
|
|
|
void mixer3Changed(bool checked);
|
|
|
|
void mixer4Changed(bool checked);
|
2016-12-21 17:14:24 -08:00
|
|
|
void mixer5Changed(bool checked);
|
|
|
|
void mixer6Changed(bool checked);
|
2018-09-02 20:17:09 -07:00
|
|
|
void ResetBalance();
|
2014-12-28 00:38:00 -08:00
|
|
|
};
|