diff options
author | Robin Burchell <robin.burchell@jollamobile.com> | 2014-01-16 15:28:02 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-07 13:23:16 +0100 |
commit | 1e23440457d64e6dec53b6b465d783673b6e9956 (patch) | |
tree | 9daff34a556b718a7e232b24518b87af08587688 | |
parent | 9a16423610405c0329fe40235313212946f08b05 (diff) | |
download | qtmultimedia-1e23440457d64e6dec53b6b465d783673b6e9956.tar.gz |
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 <yoann.lopes@digia.com>
-rw-r--r-- | src/multimedia/audio/qsoundeffect_pulse_p.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/multimedia/audio/qsoundeffect_pulse_p.cpp b/src/multimedia/audio/qsoundeffect_pulse_p.cpp index 23e8d727f..ef09cd90a 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); |