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>
This commit is contained in:
committed by
The Qt Project
parent
9a16423610
commit
1e23440457
@@ -928,12 +928,8 @@ void QSoundEffectPrivate::createPulseStream()
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
pa_proplist *propList = pa_proplist_new();
|
pa_proplist *propList = pa_proplist_new();
|
||||||
if (m_category.isNull()) {
|
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 {
|
|
||||||
pa_proplist_sets(propList, PA_PROP_MEDIA_ROLE, m_category.toLatin1().constData());
|
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_stream *stream = pa_stream_new_with_proplist(pulseDaemon()->context(), m_name.constData(), &m_pulseSpec, 0, propList);
|
||||||
pa_proplist_free(propList);
|
pa_proplist_free(propList);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user