Bug 296589

Summary: Unpausing sets volume to 100% when PA is enabled
Product: [Frameworks and Libraries] phonon-backend-vlc Reporter: Leo Franchi <lfranchi>
Component: generalAssignee: Harald Sitter <sitter>
Status: RESOLVED FIXED    
Severity: normal CC: bcooksley, bionaut, chealer, cviruss, fabo, germano.massullo, jb, jtamate, linuzlover, martin.sandsmark, mattloss34, myriam, newbeewan
Priority: NOR    
Version: unspecified   
Target Milestone: 0.5.1   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In: 0.6

Description Leo Franchi 2012-03-22 22:04:03 UTC
User-Agent:       Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.26 Safari/535.11
Build Identifier: 

Due to some stuff happening

<apachelogger> I suppose tomahawk calls play() on resume, as indicated by documentation
<apachelogger> so that will do m_player->resume();
<apachelogger> which in turn only tells vlc to unpause
<apachelogger> oh ohoh
<apachelogger> ah yes
<apachelogger> that is why I hated it so much
<apachelogger>     connect(m_mediaObject, SIGNAL(playbackCommenced()), this, SLOT(updateVolume()));
<lfranchi> uhh
<lfranchi> so
<lfranchi> right fix?
<apachelogger> well
<apachelogger> the right fix is to not do that at all
<apachelogger> however I am not sure why we do this to begin with
<apachelogger> I mean
<apachelogger> it is necessary to set the volume on play
<apachelogger> also an AO has a volume regardless of whether it is attached to a MO
<apachelogger> however adding or removing an AO from a playing MO is not supported anyway, so by all degrees of sanity that signal should only be for starting playback
<apachelogger> and even then it does not make sense because an MO always has a libvlc player instance (as it is created in its ctor)
<apachelogger> so I believe what should be going on is setting the volume on path creation
<apachelogger> and even that we might only want to do when PA support is not active
<apachelogger> as otherwise we might be messing up PAs volume restoring
<apachelogger> coling: thoughts?
-*- lfranchi feels the words flying right over his head :P
<apachelogger> lfranchi: please remove https://projects.kde.org/projects/kdesupport/phonon/phonon-vlc/repository/revisions/master/entry/src/mediaobject.cpp#L116
<apachelogger> see if that fixes the issue
<lfranchi> ok
<lfranchi> just the emit?
<apachelogger> yah
<lfranchi> k
<lfranchi> apachelogger: works then
<apachelogger> righto, so we only need to find the right solution
<j-b> what is the issue?
<apachelogger> lfranchi: if it is not too much a hassle please file abug so I do not forget to poke colin
<lfranchi> apachelogger: what shall i put in the bug?
<apachelogger> irc log, something :P
<apachelogger> I only care about titles anyway

Reproducible: Always
Comment 1 Myriam Schweingruber 2012-03-27 08:03:29 UTC
*** Bug 296147 has been marked as a duplicate of this bug. ***
Comment 2 Myriam Schweingruber 2012-03-27 08:04:07 UTC
*** Bug 295094 has been marked as a duplicate of this bug. ***
Comment 3 Harald Sitter 2012-03-28 02:25:17 UTC
Git commit f3d9ca9a489b30e79fad7f3a2b416393432210ac by Harald Sitter.
Committed on 28/03/2012 at 04:25.
Pushed by sitter into branch 'master'.

Stop applying the volume on play/resume

When PASupport is active it intercepts all AO calls and applies them to PA
directly, so changing the volume regardless of PA will lead to
unpredictable behavior as the volume value the backend AO knows about might
not be the actual volume value in the frontend/PA, so it essentially sets
a wrong volume on play/resume.

Instead it now sets the volume when a path is created between the AO and
the MO if and only if PASupport is not active. If PASupport is active it
does not set the volume at all.

Verification pending.

M  +6    -6    src/audio/audiooutput.cpp
M  +1    -1    src/audio/audiooutput.h
M  +0    -2    src/mediaobject.cpp
M  +1    -2    src/mediaobject.h

http://commits.kde.org/phonon-vlc/f3d9ca9a489b30e79fad7f3a2b416393432210ac
Comment 4 Philippe Cloutier 2012-04-06 02:54:20 UTC
I confirm this on Debian testing. Removing PulseAudio apparently fixed it, but I didn't see the effect until I restarted the system.

Thanks for fixing
Comment 5 Myriam Schweingruber 2012-05-06 11:44:23 UTC
*** Bug 299165 has been marked as a duplicate of this bug. ***
Comment 6 Attilio 2012-07-18 14:12:25 UTC
On my system, archlinux x86_64, amarok 2.5.0 kde 4.8.4 phonon-vlc 0.5.0, it happens as well. I hope that the verification process will take place soon because I have some problem with the gstreamer backend too.
Comment 7 Myriam Schweingruber 2012-09-12 09:16:24 UTC
*** Bug 285677 has been marked as a duplicate of this bug. ***