GNOME Bugzilla – Bug 320044
esdlib behaves bad with ALSA
Last modified: 2009-03-06 16:09:22 UTC
esdlib.c: /** * esd_play_stream_fallback: as esd_play_stream() but connect directly if no ESD ... * Return Value: -1 on error, else a socket number set up so that * any data sent to the socket will be played, either by an ESD or by an. */ int esd_play_stream_fallback( esd_format_t format, int rate, const char *host, const char *name ) { int socket_out; ... socket_out = esd_audio_open(); ... return socket_out; } audio_alsa09.c: (ALSA-1.0 backend is enabled) int esd_audio_open(void) { ... alsa_playback_handle = initAlsa(dev, format, channels, esd_audio_rate, SND_PCM_STREAM_PLAYBACK); ... esd_audio_fd = 0; ... return 0; } The problem with the constant zero "descriptor" is that it doesn't work in some essential cases (wsoundserver/wsoundplay are known to break).
I see something strange here. esd_audio_fd is declared as static int in audio.c, but still all the other files use it? How can that work? Should it be a global var instead?
audio.c #includes the backend audio_*.c files, that's why it's static.
As long as esound is being replaced with pulseaudio, this bug is most likely OBSOLETE.