Issue96

classification
Title No sounds other than console beep; what's wrong? (solved?)
Type defect Module core code 21.5
Severity inconvenience Platform N/A
Keywords Nosy List stephen
explanation
process
These controls should only be changed by committers and tracker administrators.
Status assigned   Reason
Superseder   Submitted 2008-01-05.22:09:31
Priority normal   Assigned To

Created on 2008-01-19.04:58:06 by stephen, last changed 2009-02-28.06:51:12 by stephen.

Messages
msg486 [hidden] ([hidden]) Date: 2008-01-23.10:13:03
Supersedes issue200.
msg358 [hidden] ([hidden]) Date: 2008-01-19.06:43:14
  Message-ID: <alpine.OSX.1.00L.0801050949170.81647@teraqry.sevanohynk.bet>
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 
X.

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 
sounds back.

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?
msg120 [hidden] ([hidden]) Date: 2008-01-19.04:58:06
  Message-ID: <871w8v2ack.fsf@uwakimon.sk.tsukuba.ac.jp>
Thanks for the analysis, I'll put it on my TODO list.  It'll be next
week, though.  Feel free to ping me if it takes longer than that (CC:
xemacs-beta of course, somebody else might pick it up from wherever I
dropped it! :-)

robert delius royar writes:

 > 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 X.
 > 
 > If I change the call from XEmacs so that the NULL is replaced by
 > "localhost", the sound plays.

_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta@xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-beta
History
Date User Action Args
2009-02-28 06:51:12stephensetstatus: chatting -> assigned
2008-01-23 10:13:41stephenlinkissue200 superseder
2008-01-23 10:13:03stephensetpriority: normal
assignedto: stephen
type: defect
severity: inconvenience
platform: + N/A
nosy: + stephen
messages: + msg486
module: + core code 21.5
2008-01-19 06:43:14robert.royarsetstatus: new -> chatting
messages: + msg358
2008-01-19 04:58:06stephencreate