Figured out my sound problems with Gnome and esd



Dan Hensley wrote:

> Elliot Lee wrote:
>
> > > Below I've attached a complete copy of an strace of esd -nobeeps (generated
> > > today), and it's not using TCP sockets.  It's using UNIX sockets, so I don't
> > > think this is the problem.  That previous strace was probably from esdplay,
> > > because it looks like it tries to connect via TCP sockets before opening
> > > /dev/dsp directly.  I can send you an strace of that if you'd like.
> >
> > esd the server is using UNIX sockets only, and all esd clients are using
> > TCP sockets only, and there's no obvious reason why.

I FINALLY figured out what the problem was by going through the source (I wish I'd
tried this weeks ago, because I would have saved myself a lot of frustration).  The
problem stems from a change listed on 9/3/99 in the ChangeLog:

 * esdlib.c: (esd_open_sound): if no ESPEAKER is set, but DISPLAY
  is, try to connect to the default port on that host. Thanks to
  Charles Galambos <ees1cg@ee.surrey.ac.uk>.

On my system, ESPEAKER was not set (never had been before, never needed it before).
So esd_open_sound was looking for ESPEAKER, not finding it, then looking at my
DISPLAY (set to my fully qualified local machine name), and then assuming that it
should connect through a TCP socket.  I would call this a bug.  I think that if
DISPLAY is going to be used, first  it should check to make sure that the machine
name is NOT the local machine name.  If it is, then it should not use DISPLAY.  I
fixed this temporarily by commenting out these lines in esdfile.c:

    if ( !(host && *host) && display ) {
 /* no espeaker specified, but the app should be directed to a
    remote display, so try routing the default port over there
    and see if we strike gold */
/* len = strcspn( display, ":" );
 if ( len ) {
     len = min( len, 256 );
     strncpy( display_host, display, len );
     display_host[ len ] = '\0';
     host = display_host;
 }
*/

If I had a bit more time, I'd provide a patch to add this check, but I have to leave
in the morning for a few days, so I won't be able to.  Let me know--if this sounds
like a good idea and you _do_ want me to work on a fix, I could do so, but it'll be
at least late next week before I could work on it.  I don't really want to have to
set yet another environment variable (since my other workaround is to set ESPEAKER).

Thanks,
Dan



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]