Comment 0 for bug 1498466

Revision history for this message
Matthew Paul Thomas (mpt) wrote :

1. Play a game that just plays occasional sound effects, not music.
2. Try to change the volume of the sound effects.

What should happen: You can.
What actuall happens: You can't unless you time it exactly right.

For brief sounds (less than a second or so), like sound effects in a game or a messaging app, you probably won't be fast enough to change their volume while they're playing. So, you need to be able to change their volume even when they aren't playing.

If you want to be able to do this with the hardware volume buttons, that means that by default (when no sound is playing), the hardware volume buttons should control the role that sound effects use.

So, the current design is that this default role for volume controls should be "alert", and that sound effects should use "alert". <https://wiki.ubuntu.com/Sound#primary-output>

Unfortunately, this doesn't work at the moment because the Qt SoundEffect API <http://doc.qt.io/qt-5/qml-multimedia.html#soundeffect> produces sounds that use do not use the "alert" role, but rather "multimedia". Because this is not the default role, the hardware volume buttons control the volume of sound effects only during the brief moments when the sound effects are actually playing.

I see three ways to resolve this bug:
A. Decide that you should not, in fact, be able to change the volume of sound effects using the hardware buttons when sound effects aren't playing.
B. Combine the "alert" and "multimedia" roles. That would have the drawback that you couldn't change sound effect volume independent of music that was playing in the background (but maybe that's not a big deal).
C. Change the SoundEffect API implementation so that it uses the "alert" role by default.

(This is the sequel to bug 1478506.)