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 / Sound to cstring

Author
Message
AlexI
19
Years of Service
User Offline
Joined: 31st Dec 2004
Location: UK
Posted: 2nd Feb 2009 02:33 Edited at: 2nd Feb 2009 02:36
Hi,
How can I get sound loaded with dbLoadSound contents into a cstring? I know could use the file read commands to do this, but I cannot use this, I need the sound loaded from memory.

I guess you would use memblocks but I have never used them and dont know how to use them.

Any idea how to use do this?

Thanks,
Alex

jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 2nd Feb 2009 02:40
Well - this is one where I'd forget dbLoadsound, and either use DarkGDK file IO or some standard C/C++ file io to load the data from the sound file directly to the CSTRING.

you'll need to know your sound file format well and know it before you try so you at least have a good idea how to write the loading code.

google about the sound file and the CSTRING thingy - whatever you're trying to do has a reason they want the data in a cstring and they probably have some info some where on hints, tips, why, rules, etc.

--Jason

AlexI
19
Years of Service
User Offline
Joined: 31st Dec 2004
Location: UK
Posted: 2nd Feb 2009 02:42
Quote: "io to load the data from the sound file directly to the CSTRING"

Quote: "
I need the sound loaded from memory."


I just need the sound in a cstring so I can send the file.

jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 2nd Feb 2009 02:57
Use either STL vector class, just allocate the memory and load it in.

Like if its DWORD's, allocate the RAM as an array of that data type.

--Jason

Login to post a reply

Server time is: 2024-11-25 13:45:01
Your offset time is: 2024-11-25 13:45:01