From 1e23440457d64e6dec53b6b465d783673b6e9956 Mon Sep 17 00:00:00 2001 From: Robin Burchell Date: Thu, 16 Jan 2014 15:28:02 +0100 Subject: [PATCH] QSoundEffect: Don't try guess a media role if one has not been provided. Trying to heuristically guess this kind of thing is almost always a bad idea. Expect the creator of the output to explicitly tell us the category instead of guessing. Change-Id: I5f2988e2456685f3622e0ab136951b1742215f71 Reviewed-by: Yoann Lopes --- src/multimedia/audio/qsoundeffect_pulse_p.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/multimedia/audio/qsoundeffect_pulse_p.cpp b/src/multimedia/audio/qsoundeffect_pulse_p.cpp index 23e8d727..ef09cd90 100644 --- a/src/multimedia/audio/qsoundeffect_pulse_p.cpp +++ b/src/multimedia/audio/qsoundeffect_pulse_p.cpp @@ -928,12 +928,8 @@ void QSoundEffectPrivate::createPulseStream() return; pa_proplist *propList = pa_proplist_new(); - if (m_category.isNull()) { - // Meant to be one of the strings "video", "music", "game", "event", "phone", "animation", "production", "a11y", "test" - pa_proplist_sets(propList, PA_PROP_MEDIA_ROLE, "game"); - } else { + if (!m_category.isNull()) pa_proplist_sets(propList, PA_PROP_MEDIA_ROLE, m_category.toLatin1().constData()); - } pa_stream *stream = pa_stream_new_with_proplist(pulseDaemon()->context(), m_name.constData(), &m_pulseSpec, 0, propList); pa_proplist_free(propList);