diff options
| author | Christoph Berg <myon@debian.org> | 2020-09-28 23:28:13 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2020-09-28 23:28:13 +0200 |
| commit | 7aa3c56b01768ba7d38fccedc17b30a4046b3fbb (patch) | |
| tree | da509a2cf3667b6f9855ea811f4a1f95d9e6f5ef /Audio/soundout.h | |
| parent | 28f34ff4908a90b1a7323b2988c33cdb1779fa06 (diff) | |
New upstream version 2.3.0~rc1+repackupstream/2.3.0_rc1+repack
Diffstat (limited to 'Audio/soundout.h')
| -rw-r--r-- | Audio/soundout.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/Audio/soundout.h b/Audio/soundout.h index 1e4b3a94..76711660 100644 --- a/Audio/soundout.h +++ b/Audio/soundout.h @@ -7,6 +7,7 @@ #include <QAudioOutput> #include <QAudioDeviceInfo> +class QIODevice; class QAudioDeviceInfo; // An instance of this sends audio data to a specified soundcard. @@ -18,15 +19,16 @@ class SoundOutput public: SoundOutput () - : m_msBuffered {0u} + : m_framesBuffered {0} , m_volume {1.0} + , error_ {false} { } qreal attenuation () const; public Q_SLOTS: - void setFormat (QAudioDeviceInfo const& device, unsigned channels, unsigned msBuffered = 0u); + void setFormat (QAudioDeviceInfo const& device, unsigned channels, int frames_buffered = 0); void restart (QIODevice *); void suspend (); void resume (); @@ -40,15 +42,18 @@ Q_SIGNALS: void status (QString message) const; private: - bool audioError () const; + bool checkStream () const; private Q_SLOTS: void handleStateChanged (QAudio::State); private: + QAudioDeviceInfo m_device; + unsigned m_channels; QScopedPointer<QAudioOutput> m_stream; - unsigned m_msBuffered; + int m_framesBuffered; qreal m_volume; + bool error_; }; #endif |
