I am using FMOD in an C++ App running on a CD, because it is on a CD i don’t want to use FSOUND_Stream and stream the MP3 file from the CD (for obvious reasons ).
So i want to use the LOADMEMORY flag, and my question is:
How do i load the file to the memory, does FMOD have a function for this or does the Windows API have one that is simple to use?
Sorry for the newbie question but i got everything to work except for this 😳
Oh .. i use Borland C++ Builder 6.0 @ Win XP using latest FMOD 3.71
This is a Delphi snippet for opening a stream from a TMemoryStream.
[code:cz7buuaa] FStreamData := TMemoryStream.Create;
FStream := FSOUND_Stream_Open(PChar(FStreamData.Memory), FSOUND_LOADMEMORY, 0, FStreamData.Size);
The equivalent C++ Builder snippet would be this.
[code:cz7buuaa] streamData = new TMemoryStream;
stream = FSOUND_Stream_Open((char *)streamData->Memory, FSOUND_LOADMEMORY, 0, streamData->Size);
[quote="brett":11c1c8tj]the fmod stream example actually has an ifdef that shows streaming from memory :-?[/quote:11c1c8tj]
Ah yes i see, i was lookin on the fopen etc myself in the help file but couldn’t figure it out, i will try the example
To be exact i dint understand how to go from the FILE to char but now i see.
Please login first to submit.