delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/06/20/22:53:25

From: Shawn Hargreaves <Shawn AT talula DOT demon DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: sound, no sound in Allegro
Date: Fri, 20 Jun 1997 20:07:44 +0100
Organization: None
Distribution: world
Message-ID: <B4HDaWAAUtqzEw3f@talula.demon.co.uk>
References: <9706191056 DOT AA26599 AT sun4nl DOT NL DOT net>
NNTP-Posting-Host: talula.demon.co.uk
MIME-Version: 1.0
Lines: 34
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Rob den Boer writes:
>I want my Allegro program also to support 'no-sound'.
>When using the install_sound routine with the AUTODETECT options, it
>doesn't report if there's NO soundcard present.

install_sound() won't fail in the absence of a soundcard, because I have
provided a special nosound driver for exactly this case, so that there
will always be a dummy device for playing sounds. You should then be
able to test if (digi_driver == &digi_none) and 
(midi_driver == &midi_none), to see whether a soundcard was found.

I must admit, though, that the autodetection of such a situation hasn't
been tested since very early betas of Allegro 2.0, since I don't have
access to any machines without a soundcard. If this is broken, it would
be great if you could do some investigation and try to figure out why...

>When using the setup utilty (the sound.cfg file) supplying no-sound, it   
>doesn't work.

What exactly happens? "It doesn't work" is a very vague description of
your trouble :-)

>Also, the program needs to know if there's no-sound, because playing a   
>wav or midi without a soundcard causes the system to crash (as   
>expected...)

That shouldn't be the case: it should go to the nosound driver, which
does exactly nothing but will keep the player routines happy. It works
for me if I specify nosound in my sound.cfg...


--
Shawn Hargreaves - shawn AT talula DOT demon DOT co DOT uk - http://www.talula.demon.co.uk/
Beauty is a French phonetic corruption of a short cloth neck ornament.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019