← Back to team overview

desktop-packages team mailing list archive

[Bug 1485522] Re: Volume obtained is 100% in multimedia sink for sounds from app


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

Starting with the pa_stream_connect_playback API, the documentation

"It is strongly recommended to pass NULL in both dev and volume and to
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

You received this bug notification because you are a member of Desktop
Packages, which is subscribed to pulseaudio in Ubuntu.

  Volume obtained is 100% in multimedia sink for sounds from app

Status in Canonical System Image:
Status in pulseaudio package in Ubuntu:

Bug description:
  I'm not sure 100% this is a bug but it is related to

  When the "Marron in trouble" games launches a sound the multimedia
  sink it's updated and when reading the volume it's always 100%.

  I'ts not 100% for other applications using the multimedia role, like
  the music app or other games/apps. The volume in that case is in sync
  with the volume that was previously set for it.

  This is the code from the indicator-sound where we get the 100%

  var props_variant = yield _pconn.call ("org.PulseAudio.Ext.StreamRestore1.RestoreEntry",
  						sink_input_objp, "org.freedesktop.DBus.Properties", "Get",
  						new Variant ("(ss)", "org.PulseAudio.Ext.StreamRestore1.RestoreEntry", "Volume"),
  						null, DBusCallFlags.NONE, -1);
  				Variant tmp;
  				props_variant.get ("(v)", out tmp);
  				uint32 type = 0, volume = 0;
  				VariantIter iter = tmp.iterator ();
  				iter.next ("(uu)", &type, &volume);

  I did a workaround branch in the indicator-sound that reads the volume
  at initilaization for every role and stores any change When the sink
  is updated I read the volume in it that is already stored instead of
  reading the volume from pulse.

  I'm not convinced of that, and would like to know why I get 100%
  volume only for this particular game.

To manage notifications about this bug go to: