After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 681639 - fix volume resets to 1.0 between playback change on OS X
fix volume resets to 1.0 between playback change on OS X
Status: RESOLVED FIXED
Product: banshee
Classification: Other
Component: GStreamer
git master
Other Mac OS
: Normal normal
: ---
Assigned To: Banshee Maintainers
Banshee Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-08-11 06:42 UTC by Timo Dörr
Modified: 2012-08-18 17:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
update the volume from gtk volume widget back to the libbanshee backend upon track change (2.17 KB, patch)
2012-08-11 06:42 UTC, Timo Dörr
needs-work Details | Review
same patch reworked against latest master (1.80 KB, patch)
2012-08-17 09:15 UTC, Timo Dörr
committed Details | Review

Description Timo Dörr 2012-08-11 06:42:15 UTC
Created attachment 220919 [details] [review]
update the volume from gtk volume widget back to the libbanshee backend upon track change

(note that although similiar, this bug is not related to recently reported bugs at https://bugzilla.gnome.org/show_bug.cgi?id=680917 and https://bugzilla.gnome.org/show_bug.cgi?id=660012)

There is an issue on OS X with the playback volume. One can change the volume with the volume widget slider and it works fine, while playing the CURRENT track. As soon as the track/stream changes, the volume resets to 1.0 (max value), but the slider in the volume widget remains at the old position.

From my investigation, i happens because the volume level on OS X is not backed by real hardware, but instead gstreamer uses a software volume mixer. This software volume mixer resets to 1.0 whenever on change the uri in the playbin object, which happens in bp_open () in the libbanshee backend each time a track is changed.

On Linux the bug doesn't occur, because the gstreamer pulseaudio and the alsa audiosink have its own mixer implementations: When using alsa, the volume widget in banshee changes the global PCM volume (it is changed for every other application, too). This volume is then restored (read out from the system driver/hardware) on next track playback. The pulseaudiosink does not save the volume level back to the driver/hardware, but pulseaudio provides its own application level mechanism to store and save the volume level, even across program restarts (if you change the banshee volume and close banshee, the previous volume is restored by pulseaudio, not by banshee code).

This volume "memory" is not present on OS X in osxaudiosink, so the attached patch sends the volume level that is selected in banshee's volume widget back to the gstreamer/libbanshee backend each time a track is changed.
Comment 1 Bertrand Lorentz 2012-08-16 19:28:51 UTC
Review of attachment 220919 [details] [review]:

Thanks for the patch!
Would you mind updating it for the changes in ConnectedVolumeButton I just committed?
As I can't test this, I'm not sure I won't mess it up if I update it myself ;)

::: src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/ConnectedVolumeButton.cs
@@ +78,3 @@
         {
+            // if the volume gets changed from outside, like when using the external alsa/pulse mixer,
+            // we have to update the Value, to adjust the position of the slider in the volume widget

Is that comment still relevant ?
Comment 2 Timo Dörr 2012-08-17 09:15:55 UTC
Created attachment 221561 [details] [review]
same patch reworked against latest master

Updated version of the patch to succeed against latest git master
Comment 3 Bertrand Lorentz 2012-08-18 17:08:36 UTC
Comment on attachment 221561 [details] [review]
same patch reworked against latest master

Thanks for the update, committed!
Comment 4 Bertrand Lorentz 2012-08-18 17:08:45 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.