diff options
| author | Christoph Berg <myon@debian.org> | 2025-09-16 12:37:12 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2025-09-16 12:57:29 +0200 |
| commit | 5a4967c577ad245a2117b7b2f71c13b1212fe285 (patch) | |
| tree | 4d09343cfe757239895a0dd9b399242d2a07d7c2 /Audio/soundout.h | |
| parent | 23c903a09fb1d73fd20b50323cd80cfb3aba8799 (diff) | |
Merge 2.7 changes, I had uploaded -1 from the wrong branch.debian/3.0.0_rc1+repack-2
Diffstat (limited to 'Audio/soundout.h')
| -rwxr-xr-x | Audio/soundout.h | 120 |
1 files changed, 60 insertions, 60 deletions
diff --git a/Audio/soundout.h b/Audio/soundout.h index 387c1b0f..d5ec8f36 100755 --- a/Audio/soundout.h +++ b/Audio/soundout.h @@ -1,60 +1,60 @@ -// -*- Mode: C++ -*- -#ifndef SOUNDOUT_H__ -#define SOUNDOUT_H__ - -#include <QObject> -#include <QString> -#include <QAudioOutput> -#include <QAudioDeviceInfo> -#include <QOperatingSystemVersion> - -class QIODevice; -class QAudioDeviceInfo; - -// An instance of this sends audio data to a specified soundcard. - -class SoundOutput - : public QObject -{ - Q_OBJECT; - -public: - SoundOutput () - : m_framesBuffered {0} - , m_volume {1.0} - , error_ {false} - { - } - - qreal attenuation () const; - -public Q_SLOTS: - void setFormat (QAudioDeviceInfo const& device, unsigned channels, int frames_buffered = 0); - void restart (QIODevice *); - void suspend (); - void resume (); - void reset (); - void stop (); - void setAttenuation (qreal); /* unsigned */ - void resetAttenuation (); /* to zero */ - -Q_SIGNALS: - void error (QString message) const; - void status (QString message) const; - -private: - bool checkStream () const; - -private Q_SLOTS: - void handleStateChanged (QAudio::State); - -private: - QAudioDeviceInfo m_device; - unsigned m_channels; - QScopedPointer<QAudioOutput> m_stream; - int m_framesBuffered; - qreal m_volume; - bool error_; -}; - -#endif +// -*- Mode: C++ -*-
+#ifndef SOUNDOUT_H__
+#define SOUNDOUT_H__
+
+#include <QObject>
+#include <QString>
+#include <QAudioOutput>
+#include <QAudioDeviceInfo>
+#include <QOperatingSystemVersion>
+
+class QIODevice;
+class QAudioDeviceInfo;
+
+// An instance of this sends audio data to a specified soundcard.
+
+class SoundOutput
+ : public QObject
+{
+ Q_OBJECT;
+
+public:
+ SoundOutput ()
+ : m_framesBuffered {0}
+ , m_volume {1.0}
+ , error_ {false}
+ {
+ }
+
+ qreal attenuation () const;
+
+public Q_SLOTS:
+ void setFormat (QAudioDeviceInfo const& device, unsigned channels, int frames_buffered = 0);
+ void restart (QIODevice *);
+ void suspend ();
+ void resume ();
+ void reset ();
+ void stop ();
+ void setAttenuation (qreal); /* unsigned */
+ void resetAttenuation (); /* to zero */
+
+Q_SIGNALS:
+ void error (QString message) const;
+ void status (QString message) const;
+
+private:
+ bool checkStream () const;
+
+private Q_SLOTS:
+ void handleStateChanged (QAudio::State);
+
+private:
+ QAudioDeviceInfo m_device;
+ unsigned m_channels;
+ QScopedPointer<QAudioOutput> m_stream;
+ int m_framesBuffered;
+ qreal m_volume;
+ bool error_;
+};
+
+#endif
|
