summaryrefslogtreecommitdiffstats
path: root/src/multimedia/audio/qsoundeffect_pulse_p.h
diff options
context:
space:
mode:
authorOtto Ryynänen <otto.ryynanen@qt.io>2018-05-23 09:10:34 +0300
committerOtto Ryynänen <otto.ryynanen@qt.io>2018-10-30 09:18:56 +0000
commit3ee6d65377cb563d49d81c3adac0523e4ae8a0b9 (patch)
treed06d1378c5679315aa6e9d53626f14f17341f04f /src/multimedia/audio/qsoundeffect_pulse_p.h
parent023c48830386566042497bfac2a01c713bc5423b (diff)
Add a support for selecting the output device used by QSoundEffect
The QSoundEffect can be forced to use a specific audio output device. This is useful on a system with multiple output devices as individual QSoundeffects can use separate output devices. Due to way QAudioOutput (alternate implementation behind QSoundEffect) is implemented, QAudioDeviceInfo is used as a method of defining the output device to be used. Task-number: QTBUG-63596 Change-Id: Ibfb9894fec914726faee4e31c42ab08832693cf6 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
Diffstat (limited to 'src/multimedia/audio/qsoundeffect_pulse_p.h')
-rw-r--r--src/multimedia/audio/qsoundeffect_pulse_p.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/multimedia/audio/qsoundeffect_pulse_p.h b/src/multimedia/audio/qsoundeffect_pulse_p.h
index 8f74d67e7..e0073f0d5 100644
--- a/src/multimedia/audio/qsoundeffect_pulse_p.h
+++ b/src/multimedia/audio/qsoundeffect_pulse_p.h
@@ -73,6 +73,7 @@ class QSoundEffectPrivate : public QObject
Q_OBJECT
public:
explicit QSoundEffectPrivate(QObject* parent);
+ explicit QSoundEffectPrivate(const QAudioDeviceInfo &audioDevice, QObject *parent);
~QSoundEffectPrivate();
static QStringList supportedMimeTypes();
@@ -150,6 +151,7 @@ private:
static void stream_adjust_prebuffer_callback(pa_stream *s, int success, void *userdata);
pa_stream *m_pulseStream = nullptr;
+ QString m_sinkName;
int m_sinkInputId = -1;
pa_sample_spec m_pulseSpec;
int m_pulseBufferSize = 0;