Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2004:
[Freeciv-Dev] (PR#8509) ALSA sound plugin for freeciv
Home

[Freeciv-Dev] (PR#8509) ALSA sound plugin for freeciv

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#8509) ALSA sound plugin for freeciv
From: "Javier Pello" <jpello@xxxxxxxxxxxxx>
Date: Wed, 14 Apr 2004 07:39:46 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=8509 >

Hi,

I have developed a sound plugin for freeciv to support ALSA,
and I would like to contribute it in case someone else finds
it useful. I was having problems with ESD (not with the freeciv
esd plugin but with the daemon itself), so I thought it would
be nice to have a plugin to directly support ALSA. The plugin
requires (recent versions of) both alsa-lib and libaudiofile.

I have attached the plugin as a patch to the sources; it should
apply cleanly to the 1.14.1 tree. It touches as few files as
possible, except for the files that are created anew. Here is
a brief description of the files altered:

m4/alsa.m4  (new)
This file is used to check for the presence of alsa-lib and
libaudiofile at compile time.

m4/sound.m4
Added a call to check for such presence, and also added
'--disable-alsa' to configure.

configure.ac
Added a new compile-time conditional 'ALSA'.

client/Makefile.am
Added references to the new source files.

client/audio.c
Added references to the new plugin.

client/audio_alsa.{h,c}  (new)
These contain the source code for the plugin itself, with the
standard entry points (init, shutdown, stop, wait, play).

A couple of remarks are in order regarding the patch. First of
all, although I have been using it for some time now, it has not
received any testing except my own, and that may not be sufficient.
Second, I make no claim of quality to the sound produced. In fact,
I think a 'click' can be heard at the end of every sample played,
but I have no idea on how to fix that: I had no knowledge of ALSA
or libaudiofile prior to making this patch, and I have learnt just
enough to make it work.

Anyway, I consider the plugin to be usable, and I guess that having
it in addition to those already in place will harm no one.

Suggestions are welcome.

Javier Pello




[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#8509) ALSA sound plugin for freeciv, Javier Pello <=