DirectSound for QuickBasic 2, version 1.1
Programmed by David Schnur of AetherSoft

Welcome.  Many of you have used the original DS4QB.  I'd therefore like to start off by saying that DS4QB was one of the coolest programs available!  Since this version of DS4QB uses the same general technique as DS4QB, I would like to give a huge credit to Nekrophidius, who started this whole thing off.  At the same time, I did NOT use any of Nekro's code.  This program is completely original in coding, and indeed uses a method of QB --> VB data transfer that I thought up.  So this is an original program - it was not plagiarised.  I do, however, credit Nekrophidius greatly, as he was the one who had the original idea of doing this.

A brief introduction to DS4QB:
DS4QB2 is a VisualBasic slave that allows a DOS program to communicate with Windows sound  resources - specifically DirectSound.  It does this through the excellent bass.dll sound library, which should also be heavily credited here.  The result of this is that QBasic programmers, or anyone programming in a DOS language, now has a fast, easy, and efficient way to play MODs, MP3s, and WAVs, and to access the capabilities of 3D Audio and Sound Blaster Live Environmental Audio Extensions.  

DS4QB2 differs from DS4QB in that it no longer uses the clipboard for data transfer.  This means that you no longer need to insert clipboard code into your program (which makes it much easier on those people who have other functions using interrupts and QB inline ASM.  What this also means is that DS4QB now uses a single OUT command to play a sound effect, with no polling of the clipboard in between.  This results in almost instantaneous sound-effects playing, while DS4QB's sound effects were so slow that it wasn't practical to use them.  DS4QB2 transfers text (such as the filename of a MOD to play) via a file called DS4QB2.DAT.  While you may think that using a file is definitely slower than using the clipboard, it turns out that it really isn't much slower at all.  Besides this, the command to play music is not very time-critical, while sound effects commands are.  So while there may be a slightly longer delay between the time you call a function to play music and when the music actually starts playing, it is negligible, and the huge increase in sound-effects speeds more than makes up for it.

This version of DS4QB2 (DS4QB2CD) supports CD Audio.  Use the LoadMusic function with a MusicType of 3 to load a CD Track.  See DSDemo for more details.

USING DS4QB2
Please run DSDEMO.EXE.  This file contains information on all of DS4QB's functions, as well as a demonstration of how they work.  If you need more examples besides the ones contained in the DSDEMO text, look at the actual source for DSDEMO.

IMPORTANT NOTE --> DS4QB popped up a window when it ran.  In order to decrease EXE size, and allow the slave to load faster, I've removed this.  Now running DS4QB will apparently do nothing.  In fact, the program is running, but is just not visible.  You should therefore always use ShutDownDS4QB before quitting your program, or else DS4QB will remain loaded.  The only other way to unload it is to press CONTROL-ALT-DELETE, select the program, and click "End Task"

SB Live EAX Preset Codes
0 = OFF, 1 = Generic, 2 = Padded Cell, 3 = Room, 4 = Bathroom, 5 = Living Room, 6 = Stone Room, 7 = Auditorium, 8 = Concert Hall, 9 = Cave, 10 = Arena, 11 = Hangar, 12 = Carpeted Hallway, 13 = Hallway, 14 = City, 15 = Mountains, 16 = Quarry, 17 = Plain, 18 = Parking Lot, 19 = Sewer Pipe, 20 = Underwater, 21 = Drugged, 22 = Dizzy, 23 = Psychotic.


DS4QB2 is Copyright (C) 2000 by AetherSoft.  You may edit, modify, and change this program's code to fit your needs provided that credit is given to David Schnur, AetherSoft and to Nekrophidius, who had the original concept.  This program may be distributed freely provided that this text file and all other files are included in the package.  All copyrights relating to the bass sound library are the property of their owners.  It is illegal to sell any program that contains the bass sound library unless you have purchased a full version of it.