Mon, 31 Dec 2007 (14:08 -0500 UTC) robert delius royar wrote:
> I do not know which CVS first exhibited this problem, but it first showed up
> when I recompiled XEmacs 21.5.28b after upgrading to Mac OS X 10.5.1. The
> newest changelog in the tree is dated 2007-12-21, but version.sh is no
> longer being updated in CVS.
> I have included installation info at the end of this message.
> I can no longer get XEmacs to play sounds through my (working) Enlighten
> Sound Daemon (v 2.38). I have verified that ESD is working on the system
> (launched at startup and plays through 127.0.0.1:16001). I verified this by
> playing /usr/local/share/xemacs/xemacs-packages/etc/sounds/boing.wav with
> esdplay; I also verified that sound-extension-list is ".wav" and that
> load-default-sounds reports "Loading sounds..." and "Loading sounds...done".
> However, no sounds play in XEmacs other than the system beep. And
> device-sound-enabled-p returns nil.
I found the line (110) in XEmacs src/esd.c that was the root of the problem:
sock = esd_play_stream(flags, speed, NULL, ESD_NAME);
The function in esdlib is prototyped as int esd_play_stream( esd_format_t
format, int rate, const char *host, const char *name );
Passing the value NULL for the host worked until I recompiled XEmacs for
Leopard. esd expects a host name or an octet string (with optional
port/socketname appended). But the code in esdlib is supposed to accept !host
as a signal to use localhost.
However, it doesnot to work because of the new scheme for setting DISPLAY in OS
If I change the call from XEmacs so that the NULL is replaced by "localhost",
the sound plays. If I change the code in esdlib.c so that esd_play_stream
checks for host==NULL and calls esd_open_sound("localhost") instead of
esd_open_sound(NULL), then the sounds will also work. Either "fix" gets the
I have not tried the third alternative of setting the environment variable
ESPEAKER to "localhost". It might also work; however, on the previous OS
(10.4), setting ESPEAKER caused hangups in XEmacs. On 10.3, it was the only
way to get esd to play.
I just wanted to followup in case anyone else using OS X 10.5 found a similar
problem with sounds.
BTW: Is anyone working on a way to use CoreAudio from within XEmacs--similar to
the way Windows sound is treated?