delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/02/18/09:41:12

From: M DOT A DOT Bukin AT inp DOT nsk DOT su
To: djgpp AT delorie DOT com
Subject: Re: Fast reading of multiple keypresses in Allegro
References: <8D53104ECD0CD211AF4000A0C9D60AE353FA26 AT probe-2 DOT acclaim-euro DOT net> <7aenjo$mmm$1 AT news5 DOT svr DOT pol DOT co DOT uk> <201zjovrum DOT fsf AT Sky DOT inp DOT nsk DOT su> <7afuu7$j1n$1 AT news6 DOT svr DOT pol DOT co DOT uk>
Date: 18 Feb 1999 20:19:11 +0600
In-Reply-To: "Andrew Davidson"'s message of "Thu, 18 Feb 1999 02:42:44 -0000"
Message-ID: <20zp6bu74w.fsf@Sky.inp.nsk.su>
Lines: 20
X-Mailer: Gnus v5.5/Emacs 19.34
Reply-To: djgpp AT delorie DOT com

"Andrew Davidson" <andrew AT lemure DOT freeserve DOT co DOT uk> writes:

> I think I'm approaching this problem from the wrong angle. Rather than play
> a sample through allegro's functions is there any way I can simply flex or
> relax the speakers a single time? Is there an ultra low-level allegro
> function I can get at to do  this? This would be a similar function to
> writing to port 61h on a pc, but would affect the speakers wired up to the
> sound card, rather than the pc speaker.

You can try MIDI, but I doubt that you can find really good notes for
noise.  But why do you need it this way at all?  Samples played with
play_sample are mixed together, and one buffer is sent to sound card,
when sound card finishes playing this buffer, it generates interrupt
and mixer prepares next buffer (or program is polling the state of
sound card in timer interrupts at intervals of some milliseconds and
detects when it is time to prepare next buffer).  Overhead is not
large (it is small) and you can use play_sample for playing noise.

-- 
Michael Bukin

- Raw text -


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