Comment 4 for bug 1485522

Revision history for this message
David Henningsson (diwic) wrote :

I've researched why the "Dinosaur" game always have sound effects at 100% volume.

Starting with the pa_stream_connect_playback API, the documentation says:

"It is strongly recommended to pass NULL in both dev and volume and to set neither PA_STREAM_START_MUTED nor PA_STREAM_START_UNMUTED – unless these options are directly dependent on user input or configuration. If you follow this rule then the sound server will have the full flexibility to choose the device, volume and mute status automatically, based on server-side policies, heuristics and stored information from previous uses. "

Yet, in QPulseAudioOutput::open ( package: qtmultimedia-opensource-src, file: src/plugins/pulseaudio/qaudiooutput_pulse.cpp ), the volume is always set, despite PA recommending otherwise. In addition, the QPulseAudioOutput constructor defaults the volume to 1.0 (maximum).

I think the QPulseAudioOutput component should default to not set the volume at all, i e, leaving "NULL" as the volume in the call to pa_stream_connect_playback.