yolobs-studio/UI/adv-audio-control.hpp

73 lines
2 KiB
C++
Raw Normal View History

2016-02-23 23:16:51 +00:00
#pragma once
#include <obs.hpp>
#include <QWidget>
#include <QPointer>
class QGridLayout;
class QLabel;
class QSpinBox;
class QCheckBox;
class QSlider;
2017-04-15 19:02:06 +00:00
class QComboBox;
2016-02-23 23:16:51 +00:00
class OBSAdvAudioCtrl : public QObject {
Q_OBJECT
private:
OBSSource source;
QPointer<QWidget> forceMonoContainer;
QPointer<QWidget> mixerContainer;
QPointer<QWidget> panningContainer;
QPointer<QLabel> nameLabel;
QPointer<QSpinBox> volume;
QPointer<QCheckBox> forceMono;
QPointer<QSlider> panning;
QPointer<QLabel> labelL;
QPointer<QLabel> labelR;
QPointer<QSpinBox> syncOffset;
2017-04-15 19:02:06 +00:00
QPointer<QComboBox> monitoringType;
2016-02-23 23:16:51 +00:00
QPointer<QCheckBox> mixer1;
QPointer<QCheckBox> mixer2;
QPointer<QCheckBox> mixer3;
QPointer<QCheckBox> mixer4;
2017-04-15 19:02:06 +00:00
QPointer<QCheckBox> mixer5;
QPointer<QCheckBox> mixer6;
2016-02-23 23:16:51 +00:00
OBSSignal volChangedSignal;
OBSSignal syncOffsetSignal;
OBSSignal flagsSignal;
OBSSignal mixersSignal;
static void OBSSourceFlagsChanged(void *param, calldata_t *calldata);
static void OBSSourceVolumeChanged(void *param, calldata_t *calldata);
static void OBSSourceSyncChanged(void *param, calldata_t *calldata);
static void OBSSourceMixersChanged(void *param, calldata_t *calldata);
public:
OBSAdvAudioCtrl(QGridLayout *layout, obs_source_t *source_);
virtual ~OBSAdvAudioCtrl();
inline obs_source_t *GetSource() const {return source;}
public slots:
void SourceFlagsChanged(uint32_t flags);
void SourceVolumeChanged(float volume);
void SourceSyncChanged(int64_t offset);
void SourceMixersChanged(uint32_t mixers);
void volumeChanged(int percentage);
void downmixMonoChanged(bool checked);
void panningChanged(int val);
void syncOffsetChanged(int milliseconds);
2017-04-15 19:02:06 +00:00
void monitoringTypeChanged(int index);
2016-02-23 23:16:51 +00:00
void mixer1Changed(bool checked);
void mixer2Changed(bool checked);
void mixer3Changed(bool checked);
void mixer4Changed(bool checked);
2017-04-15 19:02:06 +00:00
void mixer5Changed(bool checked);
void mixer6Changed(bool checked);
2016-02-23 23:16:51 +00:00
};