delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/09/22/19:30:21

From: Shawn Hargreaves <Shawn AT talula DOT demon DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: 'blocking' sound output in Allegro
Date: Mon, 22 Sep 1997 19:19:06 +0100
Organization: None
Distribution: world
Message-ID: <LeihDHAaarJ0EwRL@talula.demon.co.uk>
References: <01bcc744$a2841540$9adbad83 AT slip404 DOT rz DOT uni-osnabrueck DOT de>
NNTP-Posting-Host: talula.demon.co.uk
MIME-Version: 1.0
Lines: 17
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Michael Saure writes:
>is there a 'clean' way to do blocking sound output with Allegro?
>Or do I have to write a new function which play a sample and
>then waits for the apropriate dm_..(forgotten the exact name)-variable
>to change its value?

You have to write your own function. I'm not sure what dm_ variables you
are talking about, though: there are no such things in Allegro!

But anway. Just call allocate_voice() and voice_start() to trigger the
sound, sit there in a loop polling voice_get_position() until it has
finished, and then call deallocate_voice() to free it...


--
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