summaryrefslogtreecommitdiff
path: root/Audio/soundout.h
diff options
context:
space:
mode:
authorChristoph Berg <christoph.berg@credativ.de>2022-08-23 10:23:16 +0200
committerChristoph Berg <christoph.berg@credativ.de>2022-08-23 10:23:16 +0200
commit2d1068e60bce7ae1fff11623454900e8cee956b1 (patch)
treeacebe276e30466ef0ab91bc3da5e379bec0d7dc5 /Audio/soundout.h
parent43bebfbad6e7ba026bd3d55720c7d9e12a7ef8ef (diff)
New upstream version 2.6.0~rc3+repackupstream/2.6.0_rc3+repack
Diffstat (limited to 'Audio/soundout.h')
-rwxr-xr-xAudio/soundout.h118
1 files changed, 59 insertions, 59 deletions
diff --git a/Audio/soundout.h b/Audio/soundout.h
index 76711660..8bc06e7c 100755
--- a/Audio/soundout.h
+++ b/Audio/soundout.h
@@ -1,59 +1,59 @@
-// -*- Mode: C++ -*-
-#ifndef SOUNDOUT_H__
-#define SOUNDOUT_H__
-
-#include <QObject>
-#include <QString>
-#include <QAudioOutput>
-#include <QAudioDeviceInfo>
-
-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>
+
+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