[pulseaudio-discuss] Volume Restore

Marcus Blumhagen marcus.blumhagen at web.de
Sat Oct 17 07:10:44 PDT 2009

On Sat, Oct 17, 2009 at 01:25:17PM +0100, Colin Guthrie wrote:
> 'Twas brillig, and Colin Guthrie at 16/10/09 20:46 did gyre and gimble:
> >'Twas brillig, and Marcus Blumhagen at 16/10/09 12:47 did gyre and gimble:
> >>I recently switched to pulseaudio and discovered the very same issue.
> >>MPlayer is setting the volume on playback start. I fixed it locally by
> >>changing libao2/ao_pulse.c. I also posted this to the mplayer-users
> >>mailing list but sadly it got not much attention.
> >>
> >>Check the link for details and a patch sugesstion:
> >>http://lists.mplayerhq.hu/pipermail/mplayer-users/2009-October/077999.html
> >>
> >
> >This looks interesting. Does mplayer read back the volume from
> >pulse later tho'? The patch listed on it's own (without reading
> >the other code) would suggest that the value for volume will go
> >out of sync with what the volume actually is... I'm not sure if
> >that value is used elsewhere anyway.
> >
> >But overall, I agree that it should *not* set the volume. The only
> >question mark is whether or not there needs to be some extra code
> >to read the volume back :)
> >
> >I'll try and do some testing...
> OK, done a bit of testing and read the code a bit. When requesting
> the volume, it seems to wait for the operation to complete, before
> returning it. This isn't ideal in our aync world, but hey ho. It
> means that there is no race between starting the stream and reading
> the volume before we get the info callback, so the patch makes sense
> IMO.

So I guess I was mistaking, what is meant by out of sunc in my other
reply then. ;)

> I've applied it to the mandriva mplayer package for our upcoming
> release and I'd advise you to push for it to be included upstream.
> Good luck :)

Great, finally I got around to contribute something. I´ll check what I
can do to get this into upstream.


Marcus Blumhagen

"Any intelligent fool can make things bigger, more complex, and more
violent. It takes a touch of genius -- and a lot of courage -- to move
in the opposite direction."
                                                      -- Albert Einstein

More information about the pulseaudio-discuss mailing list