Author Topic: Volume level resets in pulseaudio for every song played  (Read 6312 times)

berarma

  • Newbie
  • *
  • Posts: 19
    • View Profile
Hi.

I've just noticed this today. I was using a recent git version and I've updated to the latest right now to try. When I start gmb the volume goes automatically to 90% from whatever level it had, I adjust it with the multimedia keys or from the volume tray icon and whenever a song starts it resets again to 90%. I use the gstreamer backend with pulseaudio, it doesn't happen with other backends.

I have no idea where's the fault, anyone?
« Last Edit: July 21, 2010, 00:01:35 by berarma »

ochosi

  • Full Member
  • ***
  • Posts: 187
    • View Profile
Re: Volume restart at every song
« Reply #1 on: July 17, 2010, 02:41:40 »
afaik pulseaudio manages the volume per application, which would mean that once you set that in your pulseaudio-mixer it resets it to that level everytime you use the application...

berarma

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Volume restart at every song
« Reply #2 on: July 18, 2010, 14:56:53 »
Thanks for answering. It happens just with gmb, I've tried changing volumes from the pulseaudio-mixer for Totem and VLC but they never get saved/restored. It's pretty annoying since volume resets with every song change making the soft volume useless. Do you know where this volumes may be saved?

I'm using pulseaudio 0.9.21-3 in a Debian Sid.

ochosi

  • Full Member
  • ***
  • Posts: 187
    • View Profile
Re: Volume reset to 90% for every song played
« Reply #3 on: July 20, 2010, 23:31:42 »
sorry, to be honest i have no clue. i removed pulse-audio a while ago because i just didn't see the point of it (for my usage).
also: i don't use gstreamer but mplayer (lower cpu-usage).

you can also change the volume within gmusicbrowser - either choose a layout that has the volbar or simply use the scrollwheel over the trayicon to adjust the volume. maybe that helps.

berarma

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Volume reset to 90% for every song played
« Reply #4 on: July 20, 2010, 23:42:54 »
Thank you very much, you pointed the flaw. I didn't remember about the volume bar in gmb, the layouts I use don't have it.

So, the problem is that I can't control the volume level from the pulseaudio icon tray since it gets overriden by the gmb level setting everytime a song starts. While pulseaudio gets the volume updates from gmb, gmb doesn't get the volume changes done from the pulseaudio volume control, thus gmb resets volume every new song.

Quentin Sculo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1082
    • View Profile
Re: Volume level resets in pulseaudio for every song played
« Reply #5 on: July 24, 2010, 03:36:36 »
thanks for reporting this problem.
The change of behavior is due to using playbin2 instead of playbin even when not using the gapless option.
playbin2 use the pulseaudio volume when used with pulseaudio.

I'll see what I can do, in the meantime you can change this line :
Code: [Select]
my $pb= $playbin2_ok ? 'playbin2' : 'playbin';by
Code: [Select]
my $pb= $playbin2_ok ? 'playbin' : 'playbin';in gmusicbrowser_gstreamer-0.10.pm to force using playbin instead of playbin2
(provided you don't use the still unstable gapless option)

berarma

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Volume level resets in pulseaudio for every song played
« Reply #6 on: July 26, 2010, 00:37:52 »
Doing this change on the latest git version returns these errors when pressing play and playing doesn't start:

*** unhandled exception in callback:
***   type GStreamer::Pipeline does not support property 'flags' at /usr/bin/../share/gmusicbrowser/gmusicbrowser_gstreamer-0.10.pm line 105.
***  ignoring at /usr/bin/gmusicbrowser line 1164.
*** unhandled exception in callback:
***   Can't call method "get_name" on unblessed reference at /usr/bin/../share/gmusicbrowser/gmusicbrowser_gstreamer-0.10.pm line 181.
***  ignoring at /usr/bin/gmusicbrowser line 1164.

Quentin Sculo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1082
    • View Profile
Re: Volume level resets in pulseaudio for every song played
« Reply #7 on: July 27, 2010, 03:57:35 »
Yes sorry, the proper way to force using playbin instead of playbin2 would be to insert :
Code: [Select]
$playbin2_ok=0;before the line I mentioned.
Anyway, I made a tiny fix in git that fix most of the problem, changing the volume in pulseaudio won't be reflected in gmb yet, but at least the volume won't be reset everytime.

berarma

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Volume level resets in pulseaudio for every song played
« Reply #8 on: July 29, 2010, 04:20:50 »
Thanks, this fix is good enough. Still, muting/unmuting volume in gmb did re-set the volume, but it's not important for me as I never do it, I just noticed it when testing the fix.