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 398430 - support pulseaudio instead of/in addition esound
support pulseaudio instead of/in addition esound
Status: RESOLVED FIXED
Product: gnome-session
Classification: Core
Component: gnome-session
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Session Maintainers
Session Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-01-19 17:42 UTC by Matthias Clasen
Modified: 2008-02-28 18:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (6.35 KB, patch)
2007-01-19 17:44 UTC, Matthias Clasen
none Details | Review
Patch (5.54 KB, patch)
2007-01-21 11:55 UTC, Vincent Untz
none Details | Review
Updated patch (5.58 KB, patch)
2007-05-06 13:47 UTC, Vincent Untz
committed Details | Review

Description Matthias Clasen 2007-01-19 17:42:39 UTC
gnome-session should support using pulseaudio instead of hardcoding esd-or-nothing.

The attached patch does not quite solve this problem yet. What it currently
does is to remove the esd-specific sample caching, which seems a bit pointless
for play-once login/logout sounds, and instead use gnome_sound_play(). 

The remaining esd-specific parts are about starting and stopping the sound daemon,
and need some pulseaudio complement.
Comment 1 Matthias Clasen 2007-01-19 17:44:14 UTC
Created attachment 80716 [details] [review]
patch
Comment 2 Vincent Untz 2007-01-21 11:55:15 UTC
Matthias: isn't it even simpler to keep using gnome_triggers_do()? Then we don't even have to locate the sound file.
Comment 3 Vincent Untz 2007-01-21 11:55:50 UTC
Created attachment 80803 [details] [review]
Patch

Based on Matthias' patch, but removing more code.
Comment 4 Vincent Untz 2007-01-21 11:56:09 UTC
(I didn't test my patch, though)
Comment 5 Matthias Clasen 2007-01-21 16:45:02 UTC
I don't know these parts of libgnome very well. 
But for the trigger to do anything, don't you have to associate a 
sound with it ?
Comment 6 Vincent Untz 2007-01-21 23:28:04 UTC
Well, I think they're defined in /etc/sound/events/gnome-2.soundlist. At least, it really looks like this is how it works, but I can't say for sure :-)
Comment 7 Vincent Untz 2007-05-06 13:47:35 UTC
Created attachment 87652 [details] [review]
Updated patch

I just tried, and the sound doesn't play anymore. Looking at this.
Comment 8 Vincent Untz 2007-05-06 15:22:23 UTC
It was in fact working, just not in my jhbuild for some reason.

We're now only missing some code to start pulseaudio instead of esound.
Comment 9 Dan Winship 2007-05-06 16:56:47 UTC
I'm pretty sure the esd-starting code in gnome-session is irrelevant,
because what really happens is:

    gnome-session starts gnome-settings-daemon and waits
      gnome-settings-daemon starts esd (and waits until it's running)
      gnome-settings-daemon registers with dbus
    gnome-session sees that g-s-d is ready and continues
    gnome-session checks if esd is running and sees that it is

So g-s-d needs pulseaudio support and gnome-session can just get out
of the sound-server-starting business altogether.
Comment 10 Vincent Untz 2007-05-09 16:02:33 UTC
Dan: I quickly looked at g-s-d, and I couldn't find where it's launching esd.

But I agree it might make sense to move all this to g-s-d.
Comment 11 Dan Winship 2007-05-09 16:45:11 UTC
Oh, yeah, g-s-d doesn't start it explicitly, it just calls gnome_sound_connection_get(), which ends up autospawning esd. Although
esd.conf turns off autospawn by default as of 0.2.37 claiming "it doesn't
work and it isn't possible to make it work". So I guess with esd 0.2.37,
gnome-settings-sound will be a no-op and gnome-session's code will get
used.
Comment 12 Jakub 'Livio' Rusinek 2007-12-11 21:16:53 UTC
Ping?
Comment 13 Bastien Nocera 2008-02-09 03:07:59 UTC
(In reply to comment #11)
> Oh, yeah, g-s-d doesn't start it explicitly, it just calls
> gnome_sound_connection_get(), which ends up autospawning esd. Although
> esd.conf turns off autospawn by default as of 0.2.37 claiming "it doesn't
> work and it isn't possible to make it work". So I guess with esd 0.2.37,
> gnome-settings-sound will be a no-op and gnome-session's code will get
> used.

Not quite. See bug 466458 comment 10 for some interesting interactions between g-s-d and gnome-session for the sample caching (and therefore sound effects from triggers).
Comment 14 Bastien Nocera 2008-02-28 18:16:39 UTC
Already fixed with the fix to bug 466458, as we don't launch esd ourselves anymore.