GNOME Bugzilla – Bug 398430
support pulseaudio instead of/in addition esound
Last modified: 2008-02-28 18:16: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.
Created attachment 80716 [details] [review] patch
Matthias: isn't it even simpler to keep using gnome_triggers_do()? Then we don't even have to locate the sound file.
Created attachment 80803 [details] [review] Patch Based on Matthias' patch, but removing more code.
(I didn't test my patch, though)
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 ?
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 :-)
Created attachment 87652 [details] [review] Updated patch I just tried, and the sound doesn't play anymore. Looking at this.
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.
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.
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.
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.
Ping?
(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).
Already fixed with the fix to bug 466458, as we don't launch esd ourselves anymore.