bug-gnubg
[Top][All Lists]
Advanced

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

Re: [Bug-gnubg] Sound problems on Windows


From: Michael Petch
Subject: Re: [Bug-gnubg] Sound problems on Windows
Date: Sat, 10 Apr 2004 12:10:42 -0600

Howdy Petr,

You are correct - and there appears to be a bug in the new wait routines
where SoundWait is called when "Enable Sound Effects" is on. There are
checks for sound being disabled in other routines but not this one. I am
assuming this was just an oversight.

I believe the problem can be fixed with the attached Patch (This cna be
applied to Sound.c v1.32 .

I think you are correct that something should be done automatically with
regards to sound card detection. Thinking about it I would detect for
the presence of a soundcard when gnubg initially runs. For most systems
soundcard detection could always return true. Under windows we can make
a call to waveOutGetNumDevs() which should return a value of 0 if no
sound cards are present.

This check can be done originally on startup. If sound card is present
everything works as it did before. If the sound card is not present then
sounds will not be played. Secondly, the GUI for sound options would be
modified to be all "disabled" (grayed out) - except for "beep on valid
input" if the sound card is not present. However the sound card
detection should not affect any of the sound settings in any way (Just
disable them). SO that if you run Gnubg the next time with a sound card,
all the previous sound settings will be preserved.

I can create such a patch and submit it (I don't have CVS write
privilege). The developers might have an issue as to why go to the extra
effort. My opinion is that especially with non savvy "windows" users you
want to automate what you can and reduce the problems they would
encounter. If there is no sound card in their system (or it is disabled
or nonfunctional) then we should be smart enough to disable sound (and
should even state on the sound option page if a soundcard is NOT present
as well as disabling the appropriate options and maintaining their
existing settings).



On Sat, 2004-04-10 at 10:20, Petr Kadlec wrote:
> Hi all!
> 
> One more sound-related problem with gnubg: As I have already
mentioned, 
> gnubg hangs when it tries to play a sound on a computer without a 
> soundcard. That is unfortunate, but can be (at least temporarily)
lived 
> with, because if the sounds are disabled in gnubg rc file, the problem
does 
> not appear.
> But the SoundWait function executes always, even with sounds disabled.
So 
> that on a computer without soundcard, gnubg freezes when terminating.
> So, as the first step, I suggest that SoundWait should do nothing when
> sounds are disabled. The second step should be to solve the problem of
> computers without sound cards properly. Theoretically, this should be 
> probably done using some detection of presence of the sound card, but
I 
> know of no such method. (A "solution" to the problem would also be not
to 
> wait for sounds to finish, i.e. return to the state implemented in
gnubg 
> some time ago.) Any better ideas?
> 
> Petr
> 
> --
> If you stay up all night wondering where the sun is, it will dawn on
you. 
> 
> 
> 
> _______________________________________________
> Bug-gnubg mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/bug-gnubg
-- 
Mike Petch
CApp::Sysware Consulting Ltd.
Suite 1002,1140-15th Ave SW.
Calgary, Alberta, Canada.
T2R 1K6.
(403)804-5700.

Attachment: sound.c.patch.132
Description: Text Data

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

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