delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/08/11/08:13:45

Message-ID: <8D53104ECD0CD211AF4000A0C9D60AE301562DCC@probe-2.acclaim-euro.net>
From: Shawn Hargreaves <ShawnH AT Probe DOT co DOT uk>
To: djgpp AT delorie DOT com
Subject: Re: Order of Operations (SB Question)
Date: Mon, 9 Aug 1999 12:04:52 +0100
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.0.1460.8)
Reply-To: djgpp AT delorie DOT com

Sahab Yazdani writes:
>  - Search for SoundBlaster Properties (ie IRQ, DMA, DMA16, BASE IO)
>  - Init using previous information (makes some variables containing
> writeports and stuff like that
>  - Install a Handler (i'm really not sure what this is for but every
> sample I looked at had it so far it only contains code that acknowledges
> the writes (or something to this level))
>  - Initialize a buffer of 2048 bytes in size (this is the mixing block)
>  - Start the DAC (turn on Speaker, make sure SB knows some infomration
> about the buffer)
>  - Open a RAW file and dumb 2048 bytes of information into the buffer
>  - DeInit (Stop DAC, free buffer, uninstall handler)

You need to fill your sample data buffer _before_ you tell the soundcard
to start playing it, because the DMA goes on in the background. Also you
will need a time delay before you stop the DAC, to give the sound a
chance to play (although 2k is very short, so you won't hear much more
than a quick pop). And make sure that your sample buffer is valid for
a DMA input: it needs to be located in conventional memory, and not
crossing a 64k page boundary (see the Allegro dma.c source for one way
of allocating such a block).


	Shawn Hargreaves.

- Raw text -


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