summaryrefslogtreecommitdiff
path: root/AudioDevice.cpp
diff options
context:
space:
mode:
authorIain R. Learmonth <irl@debian.org>2015-10-18 18:51:03 +0100
committerIain R. Learmonth <irl@debian.org>2015-10-18 18:51:03 +0100
commit7ccc963875ee66fe4c817da95461d891039ba1a2 (patch)
tree742cb44e4987b2dfe2db2aac83cd052040a97a8c /AudioDevice.cpp
parent5c4ba866a16d2d10d751152dd162d3761d68aacd (diff)
parentd63dd8d081a6fcd0715cd13f26df59fb831769d2 (diff)
Merge tag 'upstream/1.5.0'
Upstream version 1.5.0
Diffstat (limited to 'AudioDevice.cpp')
-rw-r--r--AudioDevice.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/AudioDevice.cpp b/AudioDevice.cpp
new file mode 100644
index 00000000..a557aa66
--- /dev/null
+++ b/AudioDevice.cpp
@@ -0,0 +1,23 @@
+#include "AudioDevice.hpp"
+
+#include <QMetaType>
+
+namespace
+{
+ struct init
+ {
+ init ()
+ {
+ qRegisterMetaType<AudioDevice::Channel> ("AudioDevice::Channel");
+ }
+ } static_initializer;
+}
+
+bool AudioDevice::initialize (OpenMode mode, Channel channel)
+{
+ m_channel = channel;
+
+ // open and ensure we are unbuffered if possible
+ return QIODevice::open (mode | QIODevice::Unbuffered);
+}
+