Tutorial
Sorry, I have not written a complete tutorial. But it is very easy to use the DirectSound Helper DLL. Just link the LIB file (be aware that you could have to convert it first into the correct format of your development environment, it is shipped as Visual C++ - Version) and include the header file (or in VB, just add the file DSHELP10.BAS to the project) and you can start. If you want to directly access the DirectSound-Interfaces, you have to link with dsound.lib, too.
Initialize:
dsh_Init(NULL, mainhWnd, 0) // standard init with exclusive mode and standard device!
Load a sound into a channel (there are 32 channels available, but I havenīt tested that):
CHANNELID mychannel=dsh_ChannelLoad("c:\\waves\\wave1.wav", 0, DSH_SEEKFREECHANNEL); // load a file into the next free channel
Play this sound permanently:
dsh_ChannelPlay(mychannel, DSH_LOOP); // will loop. If you donīt want this, just write: dsh_ChannelPlay(mychannel, 0);
// if you want to "speed" up the sound, add: dsh_ChannelSetFrequency(mychannel, 100000); //COOL
// the other functions are used the same way! Isnīt it easy? And the best, you can use it in languages like Visual BasicŪ, too.
Unload the DLL before quitting (normally the DLL does this automatically, but "just for fun"):
dsh_Unload();
If you have any problems with bugs, please mail me: Webmaster@wagnerma.de