xboard-devel
[Top][All Lists]
Advanced

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

Re: [XBoard-devel] XBoard dialogs


From: h.g. muller
Subject: Re: [XBoard-devel] XBoard dialogs
Date: Wed, 23 Feb 2011 08:41:24 +0100

I have a question about sound usage in XBoard. How is this typically done?
In WinBoard thee are some 30 'built-in' sounds, which are an integral part
of the executable (residing in the resource). For XBoard, however, the sounds
are external files played by an external player program, and the binary Debian
package does not contain any sounds at all.

The question becomes relevant when designing a Sound Options menu dialog.
It would be desirable to be able to select a number of standard sounds there
through a combobox (like in WinBoard), by names like 'gong', 'thud' or 'phone'.
The dialog should then know, however, what the corresponding filename is.
I guess a likely place would be something like /usr/share/games/xboard/*.wav,
but the exact place would likely be distribution and confguration dependent.
That makes it undesirabe to hard-code the filenames in xoptions.c.

I noticed that XBoard does not have someting like a -soundDirectory option
(in analogy to -bitmapDirectory or -pixmapDirectory). Perhaps a first step in
the right direction would be to implement this, and automatically prefix it
to any sound-file name passed to the player program that doesn't contain
any slashes. This could then be configured through the master settings file.
User-suppled files would then have to contain at least one slash to dodge this
mechanism, and would have to be given as "./xxx.wav" when in the current
directory. (Which doesn't seem unnatural to me.) The filename of standard
sounds selected through the combobox can then simply be "gong.wav" etc.

Do we agree this is the bestway to implement it?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]