Changeset View
Changeset View
Standalone View
Standalone View
src/audiowrapper.h
Show First 20 Lines • Show All 72 Lines • ▼ Show 20 Line(s) | 72 | Q_PROPERTY(bool seekable | |||
---|---|---|---|---|---|
73 | READ seekable | 73 | READ seekable | ||
74 | NOTIFY seekableChanged) | 74 | NOTIFY seekableChanged) | ||
75 | 75 | | |||
76 | Q_PROPERTY(QAudio::Role audioRole | 76 | Q_PROPERTY(QAudio::Role audioRole | ||
77 | READ audioRole | 77 | READ audioRole | ||
78 | WRITE setAudioRole | 78 | WRITE setAudioRole | ||
79 | NOTIFY audioRoleChanged) | 79 | NOTIFY audioRoleChanged) | ||
80 | 80 | | |||
81 | Q_PROPERTY(QList<QString> externalRenderers | ||||
82 | READ externalRenderers | ||||
83 | NOTIFY externalRenderersChanged) | ||||
84 | | ||||
81 | public: | 85 | public: | ||
82 | 86 | | |||
83 | explicit AudioWrapper(QObject *parent = nullptr); | 87 | explicit AudioWrapper(QObject *parent = nullptr); | ||
84 | 88 | | |||
85 | ~AudioWrapper() override; | 89 | ~AudioWrapper() override; | ||
86 | 90 | | |||
87 | bool muted() const; | 91 | bool muted() const; | ||
88 | 92 | | |||
Show All 10 Lines | |||||
99 | qint64 duration() const; | 103 | qint64 duration() const; | ||
100 | 104 | | |||
101 | qint64 position() const; | 105 | qint64 position() const; | ||
102 | 106 | | |||
103 | bool seekable() const; | 107 | bool seekable() const; | ||
104 | 108 | | |||
105 | QAudio::Role audioRole() const; | 109 | QAudio::Role audioRole() const; | ||
106 | 110 | | |||
111 | QList<QString> externalRenderers() const; | ||||
112 | | ||||
107 | Q_SIGNALS: | 113 | Q_SIGNALS: | ||
108 | 114 | | |||
109 | void mutedChanged(bool muted); | 115 | void mutedChanged(bool muted); | ||
110 | 116 | | |||
111 | void volumeChanged(); | 117 | void volumeChanged(); | ||
112 | 118 | | |||
113 | void sourceChanged(); | 119 | void sourceChanged(); | ||
114 | 120 | | |||
Show All 14 Lines | |||||
129 | void playing(); | 135 | void playing(); | ||
130 | 136 | | |||
131 | void paused(); | 137 | void paused(); | ||
132 | 138 | | |||
133 | void stopped(); | 139 | void stopped(); | ||
134 | 140 | | |||
135 | void audioRoleChanged(); | 141 | void audioRoleChanged(); | ||
136 | 142 | | |||
143 | void externalRenderersChanged(); | ||||
144 | | ||||
137 | public Q_SLOTS: | 145 | public Q_SLOTS: | ||
138 | 146 | | |||
139 | void setMuted(bool muted); | 147 | void setMuted(bool muted); | ||
140 | 148 | | |||
141 | void setVolume(qreal volume); | 149 | void setVolume(qreal volume); | ||
142 | 150 | | |||
143 | void setSource(const QUrl &source); | 151 | void setSource(const QUrl &source); | ||
144 | 152 | | |||
Show All 37 Lines | 179 | private: | |||
182 | void playerPositionSignalChanges(qint64 newPosition); | 190 | void playerPositionSignalChanges(qint64 newPosition); | ||
183 | 191 | | |||
184 | void playerVolumeSignalChanges(); | 192 | void playerVolumeSignalChanges(); | ||
185 | 193 | | |||
186 | void playerMutedSignalChanges(bool isMuted); | 194 | void playerMutedSignalChanges(bool isMuted); | ||
187 | 195 | | |||
188 | void playerSeekableSignalChanges(bool isSeekable); | 196 | void playerSeekableSignalChanges(bool isSeekable); | ||
189 | 197 | | |||
198 | void externalRenderersSignalChanges(); | ||||
199 | | ||||
190 | friend class AudioWrapperPrivate; | 200 | friend class AudioWrapperPrivate; | ||
191 | 201 | | |||
192 | std::unique_ptr<AudioWrapperPrivate> d; | 202 | std::unique_ptr<AudioWrapperPrivate> d; | ||
193 | 203 | | |||
194 | }; | 204 | }; | ||
195 | 205 | | |||
196 | #endif // AUDIOWRAPPER_H | 206 | #endif // AUDIOWRAPPER_H |