Changeset View
Changeset View
Standalone View
Standalone View
backends/mixer_pulse.h
Show All 21 Lines | |||||
22 | #ifndef MIXER_PULSE_H | 22 | #ifndef MIXER_PULSE_H | ||
23 | #define MIXER_PULSE_H | 23 | #define MIXER_PULSE_H | ||
24 | 24 | | |||
25 | #include <QString> | 25 | #include <QString> | ||
26 | 26 | | |||
27 | #include "mixer_backend.h" | 27 | #include "mixer_backend.h" | ||
28 | #include <pulse/pulseaudio.h> | 28 | #include <pulse/pulseaudio.h> | ||
29 | 29 | | |||
30 | struct QtPaMainLoop; | ||||
marten: forward declare QtPaMainLoop, move include to cpp file | |||||
31 | | ||||
30 | typedef QMap<uint8_t,Volume::ChannelID> chanIDMap; | 32 | typedef QMap<uint8_t,Volume::ChannelID> chanIDMap; | ||
31 | typedef struct { | 33 | typedef struct { | ||
32 | int index; | 34 | int index; | ||
33 | int device_index; | 35 | int device_index; | ||
34 | QString name; | 36 | QString name; | ||
35 | QString description; | 37 | QString description; | ||
36 | QString icon_name; | 38 | QString icon_name; | ||
37 | pa_cvolume volume; | 39 | pa_cvolume volume; | ||
Show All 34 Lines | 54 | public: | |||
72 | int id2num(const QString& id); | 74 | int id2num(const QString& id); | ||
73 | 75 | | |||
74 | protected: | 76 | protected: | ||
75 | int open() override; | 77 | int open() override; | ||
76 | int close() override; | 78 | int close() override; | ||
77 | 79 | | |||
78 | int fd; | 80 | int fd; | ||
79 | QString _id; | 81 | QString _id; | ||
82 | std::unique_ptr<QtPaMainLoop> m_mainloop; | ||||
marten: pointer | |||||
80 | 83 | | |||
81 | private: | 84 | private: | ||
82 | bool addDevice(devinfo& dev, bool isAppStream = false); | 85 | bool addDevice(devinfo& dev, bool isAppStream = false); | ||
83 | bool connectToDaemon(); | 86 | bool connectToDaemon(); | ||
84 | void emitControlsReconfigured(); | 87 | void emitControlsReconfigured(); | ||
85 | void updateRecommendedMaster(devmap* map); | 88 | void updateRecommendedMaster(devmap* map); | ||
86 | 89 | | |||
87 | protected slots: | 90 | protected slots: | ||
Show All 9 Lines |
forward declare QtPaMainLoop, move include to cpp file