Mail Archives: djgpp/1999/08/06/18:02:50
Message-ID: | <37AB59B6.BA0E593A@geocities.com>
|
From: | Sahab Yazdani <beyonder69 AT geocities DOT com>
|
X-Mailer: | Mozilla 4.51 [en] (Win98; I)
|
X-Accept-Language: | en
|
MIME-Version: | 1.0
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Order of Operations (SB Question)
|
Lines: | 31
|
Date: | Fri, 06 Aug 1999 17:55:03 -0400
|
NNTP-Posting-Host: | 209.103.50.194
|
X-Complaints-To: | abuse AT sprint DOT ca
|
X-Trace: | newscontent-01.sprint.ca 933976611 209.103.50.194 (Fri, 06 Aug 1999 17:56:51 EDT)
|
NNTP-Posting-Date: | Fri, 06 Aug 1999 17:56:51 EDT
|
Organization: | Sprint Canada Inc.
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Reply-To: | djgpp AT delorie DOT com
|
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()
- Raw text -