Visual Basic Code , VB.NET Code, VB Code
  Home   :  Code   :  Forums   :  Submit   :  Mailing List   :  About   :  Contact


What to do when sounds are not a file?


What to do when sounds are not a file?

Author
Message
TheSaint2
TheSaint2
Forum God
Forum God (767 reputation)Forum God (767 reputation)Forum God (767 reputation)Forum God (767 reputation)Forum God (767 reputation)Forum God (767 reputation)Forum God (767 reputation)Forum God (767 reputation)Forum God (767 reputation)

Group: Forum Members
Posts: 3, Visits: 3
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
GO


Similar Topics


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....

















A1VBCode Forums


Search