[Top][All Lists]

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

[Bug-gnubg] Sound.c version 1.15 line 893

From: Nardy Pillards
Subject: [Bug-gnubg] Sound.c version 1.15 line 893
Date: Sat, 21 Sep 2002 16:06:23 +0200

GNUBg builds, Win32

The exit sound (and some other sounds too) don't play (just a short 'duh'),
because of the SND_ASYNC.
The advantage of async: the sound plays in the background while the program
Disadvantage: the sounds stops abruptly when another playsound() is called,
or ... when the program ends.

So I think (for the moment) it is better to change SND_ASYNC to SND_SYNC.
This way the sound is played, and the program only continues when the sound
is done.

Best would be to have both playsounds.
The sync for 'end' events, and the async for others.
('end' events like exit, game over, match over, dance)

sound.c, line 892-894:
#ifdef WIN32
      PlaySound ( filename, NULL, SND_FILENAME | SND_SYNC );

There is another possibility too:
Insert Sleep (x) after the Playsound() that must be played before continuing
the program.
But I don't know if Sleep() is a standard C function.

I've published a gnubg.exe (gnubg-020920) on:
so you can take a look how the snd_sync behaves.
(For those that have Windows)


reply via email to

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