summaryrefslogtreecommitdiffstats
path: root/src/multimedia/audio/qaudiosystem_p.h
diff options
context:
space:
mode:
authorPiotr Srebrny <piotr.srebrny@qt.io>2022-11-04 12:20:19 +0100
committerPiotr Srebrny <piotr.srebrny@qt.io>2022-11-11 12:21:28 +0100
commit5196cc4c58760eb157f83aef6b37bcbff91a21fd (patch)
treefadb320da8cd26cff41b595fedb3f4dd8e75f0e9 /src/multimedia/audio/qaudiosystem_p.h
parent97b75440e1e70fe01c3ab1f66ac03401640771a4 (diff)
Add parent-child relationship on audio sources and sinks
QAudioSink and QAudioSource must propagate their parents to the platform specific implementation to enable correct operation of the moveToThread function. Furthermore, all QObject elements that are owned by audio sink/source must also establish the parent-child relationship. This mainly affects QTimer's used by the audio sink/sources. Fixes: QTBUG-108187 Change-Id: I476a97300a6fb1e0022b2a5570a3803be8fd0a88 Reviewed-by: Lars Knoll <lars@knoll.priv.no> (cherry picked from commit 7c55a711cf5153d5b0a7e2318314cbe0c1e42361)
Diffstat (limited to 'src/multimedia/audio/qaudiosystem_p.h')
-rw-r--r--src/multimedia/audio/qaudiosystem_p.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/multimedia/audio/qaudiosystem_p.h b/src/multimedia/audio/qaudiosystem_p.h
index 1e864716d..cfb21fd22 100644
--- a/src/multimedia/audio/qaudiosystem_p.h
+++ b/src/multimedia/audio/qaudiosystem_p.h
@@ -33,6 +33,7 @@ class Q_MULTIMEDIA_EXPORT QPlatformAudioSink : public QObject
Q_OBJECT
public:
+ QPlatformAudioSink(QObject *parent) : QObject(parent) {}
virtual void start(QIODevice *device) = 0;
virtual QIODevice* start() = 0;
virtual void stop() = 0;
@@ -62,6 +63,7 @@ class Q_MULTIMEDIA_EXPORT QPlatformAudioSource : public QObject
Q_OBJECT
public:
+ QPlatformAudioSource(QObject *parent) : QObject(parent) {}
virtual void start(QIODevice *device) = 0;
virtual QIODevice* start() = 0;
virtual void stop() = 0;