Mail Archives: djgpp/1999/02/18/09:41:12
"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 -