Message-ID: <8D53104ECD0CD211AF4000A0C9D60AE356734A@probe-2.acclaim-euro.net> From: Shawn Hargreaves To: djgpp AT delorie DOT com Subject: Re: Fast reading of multiple keypresses in Allegro Date: Fri, 19 Feb 1999 15:53:40 -0000 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.0.1460.8) Content-Type: text/plain Reply-To: djgpp AT delorie DOT com Andrew Davidson 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? The SB does have a non-DMA mode where you can just write sample values to the DAC whenever you feel like it, but I don't think this will really do what you want (so what exactly do you want, anyway? It would be useful if you could describe your goal in a bit more detail :-) Modern soundcards are designed for playing streams of sample data at a constant rate, and I think you will have a lot of trouble coaxing them to emulate those old speaker effects. From what you said about playing a noise effect, why not just generate a sample which contains this sound and then trigger it at the appropriate times? If you want continual white noise, a second or so of looping sample will do this very nicely. If you want to generate a waveform on the fly, you can use the Allegro audio streaming functions, as demonstrated in ex28.c. Shawn Hargreaves.