Qbasicnews.com
April 05, 2020, 03:44:54 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: I have a request...  (Read 2933 times)
Rokkuman
Na_th_an
*****
Posts: 1973



« on: February 16, 2003, 05:41:27 PM »

Could someone either:

 Write a small tutorial for me on how to make your game play WAV files and make the tutorial assume that I know ZERO PERCENT, on how to get wavs to play. Because I really don't know.

OR

 Explain how that one program wavplay.bas at qbasic.com in the sound section works.

I'd appreciate it if either one of these were done. Thanks.
Logged
na_th_an
*/-\*
*****
Posts: 8244



WWW
« Reply #1 on: February 16, 2003, 07:13:30 PM »

It is self explanatory, just call something like: PlayWav "c:\windows\sound\boot.wav"

But this is not suited. You have to use DMAPlay if you want sound in the background.

To play a WAV you have to extract its sample data and send it thru' DMA to SB. I don't know how it is done, as I use someone's else code which works OK (DMAPlay).

I wouldn't recommend you to use DMAPlay as it doesn't work in many systems. I'd recommend you to use DirectQB soundsystem or maybe DS4QB if your game is for fast PCs (in my 233 DS4QB is laggy and makes any game crawl).
Logged

SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Hexadecimal Disaster
Been there, done that
*****
Posts: 1123



« Reply #2 on: February 18, 2003, 12:50:28 AM »

Some observations...

- Reading through the code of DMAplay you can find "SB 2.0 to SB AWE64 background playing using DMA.". That means that DMAplay uses DMA auto-init mode, what's basically the same thing that DirectQB sound engine does.

- DS4QB, in all of its versions, is laggy due to the way in which it was designed. Sure, on fast computers you won't notice any lag, but you can bet that it'll miss about the 35% of the SFX samples. DS4QB works great on the music department, though.
Logged

img]http://usuarios.vtr.net/~disaster/sigs/annoyizer.php[/img]
Piptol
Ancient QBer
****
Posts: 422



WWW
« Reply #3 on: February 18, 2003, 10:57:07 AM »

Quote from: "Hexadecimal Disaster"
- DS4QB, in all of its versions, is laggy due to the way in which it was designed. Sure, on fast computers you won't notice any lag, but you can bet that it'll miss about the 35% of the SFX samples. DS4QB works great on the music department, though.


True. I have a 1Ghz machine and I still get problems with sound cutting out, and I still get pauses between switching musics with DS4QB2  :roll:
Logged

In a world without walls and doors, who needs Windows and Gates?
Hexadecimal Disaster
Been there, done that
*****
Posts: 1123



« Reply #4 on: February 18, 2003, 04:25:34 PM »

On the other hand, BWSB could be the answer... if that system had the ability to load samples at run-time. But since that isn't the situation... *sigh* well, our last hope is to wait for the new version of DS4QB by Lithium that uses a different method to communicate between the slave and the QB proggie. Not the DSock way, sadly, but let's hope that the new method will be fast enough to avoid the SFX lag.

PJ, try to implement DMAplay in your game once you have managed to split your proggie in modules. It has the same "compatibility rate" than DirectQB sound module, (that's it, SB 2.0 and compatibles) but if my memory serves me well, it only support one channel. At least the code is easily understandable and you can adapt that code to your game in a breeze.
Logged

img]http://usuarios.vtr.net/~disaster/sigs/annoyizer.php[/img]
R@dioman
Ancient QBer
****
Posts: 410



« Reply #5 on: February 18, 2003, 06:30:30 PM »

Is there any way of using frequency modulation for sound effects to get around from using memory hog wav's? I forget if DS4QB allows that. Perhaps if you created extremely short mods where you would have a track with only 1-16 rows, have direct access to them from memory, which would allow some cool possibilities for old-school sound effects! Who knows, maybe I'm just talking out of my ass
Logged

toonski84
__/--\__
*****
Posts: 2567



« Reply #6 on: February 18, 2003, 08:55:04 PM »

ds4qb++ claimed to be faster, being made in c++ and not visual basic, and also claiming to have more efficient code as well.  but the simple act of playing an mp3 is killer on old ocmputers, if that's what you use (i used to have winamp on all the time when i played bombe-i-mean-dynamiteman).
Logged

i]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!