Mail Archives: djgpp/1999/08/07/16:35:47
Did the memory you allocate reside under the 1MB barrier ? it has to be for
DMA transfers to occur. I think it also has to be segment-aligned
(16-bytes) (not sure about this).
I recommend you also check out the source for Allegro: find out how they do
things; it can always help.
At 05:55 PM 8/6/99 -0400, you wrote:
>Okay I have written some code to play some SFX with the Sound Blaster.
>The problem is that when I try to write anything to the sound blaster
>the porgram crashes. In order here is what I do:
>
> - 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)
>
>The program compiles fine, and I'm pretty sure I have the right ports
>and stuff like that, but then the Program GPFs at the part where I open
>a RAW file for reading.
>
>Note that I only initialize 2048 because I want to mix sounds later on
>(a la SMIX library by Ethan Brodsky).
>Note 2: And please don't anybody tell me to abandon this project and go
>use the Allegro Library. I am aware of the libraries greatness. But my
>purpose is to learn *how* to do this, not how to program with Allegro!
>
>PS. What do these functions do? (They wheren't in the libC help)
>
>_farsetsel()
>_fargetsel()
>_farnspokeb()
they're under _far*
>
>
- GodOfWar
In the world of computers, things tend to become faster, smaller and
cheaper with time. Does that mean that Microsoft invented time travel ?
- Raw text -