summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2021-06-24 16:11:39 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2021-06-25 09:06:49 +0200
commitbd7b700a6e42a2bc8c56f488c7a974557a2b0d20 (patch)
tree276c8c2e4aa558327c493aa7876f36d6fa6d97b5
parent4704a2d7e690da3113b675c7543a142ced353afa (diff)
Move decls in relation to #if'ery to get the code to compile
Fixup for commit 634894a8a83b021386da8c2672628b0b26185ef3 which looks like it only really meant to suppress the role-related part of the initialization. Moved one declaration out of the new #if-ery to before it; and one from before it to within it, the only use of which was commented out further down. Change-Id: I595679eda5ccd848de16a7aa2dc7c39fdc3f329c Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: André de la Rocha <andre.rocha@qt.io>
-rw-r--r--src/multimedia/platform/pulseaudio/qpulseaudiosink.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/multimedia/platform/pulseaudio/qpulseaudiosink.cpp b/src/multimedia/platform/pulseaudio/qpulseaudiosink.cpp
index 99f2dc09b..87779e5a7 100644
--- a/src/multimedia/platform/pulseaudio/qpulseaudiosink.cpp
+++ b/src/multimedia/platform/pulseaudio/qpulseaudiosink.cpp
@@ -303,9 +303,10 @@ bool QPulseAudioSink::open()
pulseEngine->lock();
- qint64 bytesPerSecond = m_format.sampleRate() * m_format.bytesPerFrame();
+ pa_proplist *propList = pa_proplist_new();
#if 0
+ qint64 bytesPerSecond = m_format.sampleRate() * m_format.bytesPerFrame();
static const char *mediaRoleFromAudioRole[] = {
nullptr, // UnknownRole
"music", // MusicRole
@@ -319,7 +320,6 @@ bool QPulseAudioSink::open()
"game" // GameRole
};
- pa_proplist *propList = pa_proplist_new();
const char *r = mediaRoleFromAudioRole[m_role];
if (r)
pa_proplist_sets(propList, PA_PROP_MEDIA_ROLE, r);