1. Re: Wave player
- Posted by Jacques Deschjnes <desja at QUEBECTEL.COM> Oct 19, 1996
- 1495 views
- Last edited Oct 20, 1996
Hi Micheal, I'm presently studiing Dos extender. I think that Causeway is reprogramming the programmable interrupt controller to redirect IRQ to non standard software interrupt. Normally IRQ 0-7 are link to INT #A-#10 and IRQ8-15 to INT #70-#77. This week I read that some dos extender reprogram PIC so that IRQ point to other INT. it's probably why my interrupt work fine when I call the INT but it doesn't work when sound card trigger an IRQ (it doesn't goes to the standard INT) I have no Idea how long it will take me to solve that problem. I did'nt gave up yet. The best I can do for your game sound problem his to send you a version of the include file. which can play wave file without using IRQ. The problem with it is that if the file is bigger than the dma buffer size (64KB maximum) you can't play it in back ground. the program have to loop to watch the end of dma transfert and then load the buffer with the next wave segment before calling PlayBuffer(). But if the wave data is smaller than 64KB you can play it in background. In a game I think the best way to use it is to allocate one buffer for each sound effect and load the waves in it. then call PlayBuffer() with the specific buffer address when needed. I'll send you a zip file containing all the includes needed to play wave and the demo program to your e-mail at lgp.com. You need a sound blaster card to use it. Known bug: ResetDSP() fail to reset dsp sometimes on first call. Then on second call it work. I don't why. So I sent this code to you as is. Hoping you could do some sound test in your game. Jacques