On Mon, Mar 18, 2013 at 09:15:16PM +0100, Stephen Kitt wrote:
> Hi,
>
> On Mon, Mar 18, 2013 at 02:47:47PM +0000, Steven Chamberlain wrote:
> > On 17/03/13 19:35, Adam Borowski wrote:
> > > On systems that don't have OSS installed and configured, pressing any
> > > button that has an attached sound, causes a crash.
> >
> > Another option might be to disable sound on Linux, then at least we'd
> > keep something that works.
>
> Alternatively, oss-compat is supposed to be used by packages such as
> this one with a requirement for OSS. Adam, could you try installing it
> to see if the modules it sets up allow lletters to work? It may not
> play all that nicely with pulseaudio...
Works, but only after a reboot (I tested on a Debian-provided kernel in a
fresh wheezy install as well, to be sure). Having to reboot just to check
out a simple child game is not nice.
> For Jessie we'll have osspd, but oss-compat or disabling audio as
> Steven suggested seem to me to be the only options for Wheezy.
Here's another solution:
Depends: sox
if (!fork())
{
const char* arg[4];
arg[0] = "/usr/bin/play";
arg[1] = "-q";
arg[2] = the_file_to_play;
arg[3] = 0;
execve(arg[0], arg, environ);
exit(127);
}
Works on all sound systems, doesn't crash if no sound is available, doesn't
hang on 64 bit architectures (and I guess big-endian too), supports formats
other than .wav (in case someone localizes sounds). And doesn't use that
ridiculous code with more leaks than ${SOME_MICROSOFT_SLUR}.
One could use, say, SDL_sound to avoid the fork(), but come on, let's be
serious.
--
ᛊᚨᚾᛁᛏᚣ᛫ᛁᛊ᛫ᚠᛟᚱ᛫ᚦᛖ᛫ᚹᛖᚨᚲ
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]