Page 1 of 1
Integrated digital audio
Posted: Sun Mar 02, 2003 5:02 am
by Guest
Does anyone know anything at all about programming Integrated digital audio? I can't get it to work with anything except DQ4QB++ and I need faster sounds than it can produce for the game I am working on.
Re: Integrated digital audio
Posted: Tue Mar 11, 2003 9:19 pm
by GPfault
I assume you're talking about using a sound card?
You should be aware of how any "sound library" will work:
Only one "sound stream/buffer" can be active at once. "Multiple sounds" at once is actually a bunch of sounds being combined into one chunk, then sent out to the sound card as a sum of samples. Unless the sound card itself is capable of multiple sounds, this mixing will take some time.
There are quite a few tradeoffs:
Latency vs speed.
The sound card works faster if it has fewer but larger packets of sound. Once a packet has been sent out, any new sounds have to wait for the next to be sent before their blendings are heard.
The quicker the packets, the more overhead you encounter.
Also, because QB is a DOS program, any I/O port (DMA, PIC, TIMER, sound card) access has to go through a bunch of red tape because Windows is protective of those ports and has to monitor them. (Some other program might be using the sound card)
I can't help you choose a library, but I hope this gives you a peek at what a library has to go through.
If you're considering writing your own, try going to developer.creative.com to get a manual. UNDER NO CONDITIONS are you to distribute it (You could get in trouble). You would be perfectly all-right to read it yourself though.
Re: Integrated digital audio
Posted: Tue Mar 25, 2003 1:05 am
by Dr_Davenstein
Thanks for the link.I did come up with one solution,but it is'nt really a solution...
What I was doing was making a pinball game.I needed to have a "bouncing"sound play several times within one second.Instead of trying to play the same sound several times I just re-recorded the sound like this.
if bounces=1 then soundfile$="onebounce"
if bounces=2 then soundfile$="twobounce"
etc...
I'm sure you get the point.
It does work alot better this way.
DS4QB++ was totally free and I'm sure that Lithium went to alot of trouble to make it for us.
So I'm not complaining,I was just curious. ;D