[Gtk-sharp-list] Simple Audio Test - Gnome.Sound.Play method?

Adam Tauno Williams adam at morrison-ind.com
Tue Apr 22 09:04:22 EDT 2008

> As far as I can tell from the GNOME docs
> (http://library.gnome.org/devel/libgnome/stable/libgnome-gnome-sound.html)
> and the parameter names in the GNOME# API
> (http://www.go-mono.com/docs/monodoc.ashx?tlink=4@ecma%3a535%23Sound%2fM%2f3),
> this GNOME sound API works by connecting to an ESD sound player
> daemon. The Init method takes the hostname of this daemon. Normally
> I'd expect that you'd use "localhost" for the local machine, unless
> you want to play sound over the network :-)
> Hence the following probably works:
> Gnome.Sound.Init ("localhost");
> Gnome.Sound.Play ("/home/user/test.wav");

I believe it is supposed to be localhost unless the ESPEAKER  
environment variable is defined.  ESPEAKER acts like DISPLAY, except  
it is for audio.  This way users of thin-clients (like LTSP) get their  
audio locally.  I haven't used it from Mono but it works quite well as  
long as your network isn't choked.

A nice behavior would be for Gnome.Sound to default to ESPEAKER or localhost.

More information about the Gtk-sharp-list mailing list