Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / OGG / WAV from Memory

Author
Message
Zumwalt
17
Years of Service
User Offline
Joined: 1st Feb 2007
Location: Tampa, FL
Posted: 16th Mar 2007 16:53
How do I read in an OGG or WAV file from memory?
Here is what I want to do, read in the OGG or WAV into a byte array, then pass a pointer to that array into the player for playing WAV or OGG files (sound effects and music).

I will be storing all sound bytes in different encrypted files (think of them as personal music banks), then in the game, I want to play from memory, passing it the decrypted object.

Is this currently possible if not will this become possible in the near future? Its something I really need.
cypher0
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location:
Posted: 16th Mar 2007 17:02
In .NET you can use System.Media.SoundPlayer to load and play a WAV file byte array from memory.

For a slightly more long-winded approach, in GDK you can use:

MemBlock.MakeMemblockFromSound
MemBlock.ExtGetMemblockPtr
MemBlock.MakeSoundFromMemblock

to load a sound file from memory

Login to post a reply

Server time is: 2024-09-28 23:18:51
Your offset time is: 2024-09-28 23:18:51