[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
continues.
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 );
#else
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:
http://users.skynet.be/bk228456/gnubg-020920.zip
so you can take a look how the snd_sync behaves.
(For those that have Windows)
__________
Nardy
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug-gnubg] Sound.c version 1.15 line 893,
Nardy Pillards <=