delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/02/19/15:50:57

From: "Andrew Davidson" <andrew AT lemure DOT freeserve DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Fast reading of multiple keypresses in Allegro
Date: Fri, 19 Feb 1999 20:44:14 -0000
Organization: Customer of Planet Online
Lines: 32
Message-ID: <7akim8$1k6$1@news5.svr.pol.co.uk>
References: <8D53104ECD0CD211AF4000A0C9D60AE356734A AT probe-2 DOT acclaim-euro DOT net>
NNTP-Posting-Host: modem-65.technetium.dialup.pol.co.uk
X-Trace: news5.svr.pol.co.uk 919457288 1670 62.136.21.65 (19 Feb 1999 20:48:08 GMT)
NNTP-Posting-Date: 19 Feb 1999 20:48:08 GMT
X-Complaints-To: abuse AT theplanet DOT net
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.0810.800
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.0810.800
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Shawn Hargreaves <ShawnH AT Probe DOT co DOT uk> wrote in message
news:8D53104ECD0CD211AF4000A0C9D60AE356734A AT probe-2 DOT acclaim-euro DOT net...
>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.

I'm actually after emulating the tv speaker connected to a Spectrum computer
which was activated using bit 4 of port 254. The speaker flexes if bit 4 is
a 1 and relaxes if bit 4 is a 0. I need to do this in real time to tie in
with the rest of the emulation.

>If you want to generate a waveform on the fly, you can use the
>Allegro audio streaming functions, as demonstrated in ex28.c.

Would this be capable of playing real time music and sound effects generated
by flexing/relaxing a speaker at differing frequencies? I'll have to have a
look at this.

Andrew


- Raw text -


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