I need a sound function that can take a wave file contained in a string, like
dim sWaveFile as String Get 1, longWaveFileLocationInFile, sWaveFile
Outputting the string to a file and load it as a file works but is too slow. And sndPlaySound with the SND_MEMORY flag won't do, since it's causing crashes.
Can I do this using DirectSound maybe? Please help.
(Here's the background if anyone is interested: I've designed a game in Visual Basic 6 where the user can construct their own robots. Your robot will fight other peoples robots (Available here http://robowar.sourceforge.net/RoboWar5/)
Previously the robots consisted of multiple files, 1 file for code, 1 file for their picture and one file for each of the robots sounds. Now I'm working on robots that consist of one file.
The files are custom binary files and I'm loading the sounds into strings with the Get function.)
Thanks for reading. Kevin
|