0
0

In the product I’m working on I do not have the ability to give FMOD a file, but rather, I have all of the data that is contained in an event file becuase I loaded it myself from the disk. Basically at run time I have a resource that represents the file, but no file or filename.

Is there a way to pass the bytes that represent the event file to fmod and have it read them like they are the event file?

Thanks,
Kyle

  • You must to post comments
0
0

Try setFilesystem. Encode the address of the data into a filename (hexadecimal or decimal would work) and pass that to FMod. FMod will pass that filename to your filesystem and then you can use it to access the data.

You might want to pass the address of a structure instead so that you can include length and other information for bounds checking purposes, or use numeric indexes into a table instead. But that’s a basic way to do it.

  • You must to post comments
0
0

I understand what you are saying, and in the end, this might be our only way of getting the results that we want.

I would much rather pass an address in ram where the bytes that represent the event file are and have fmod read that. Hopefully the read functions dont rely entirely on the file system to read files from disk and a new function can be created easily.

  • You must to post comments
0
0

The idea of an "EVENT_LOADFROMMEMORY" flag has been raised before and we’ll probably implement this soon. Incidentally, are all your .fsbs in memory as well? If so, then System::setFileSystem would be the only way to get FMOD to be able to access them.

Cheers,

  • You must to post comments
0
0

I dont currently have all of the .fsbs in memory, but I intend to have them loaded seperately than through fmods load from file type functions. Will an "EVENT_LOADFROMMEMORY" flag be available for all file types that fmod loads or will this only be for the EventFiles?

  • You must to post comments
0
0

EVENT_LOADFROMMEMORY will be for .fev files only. We are implementing a .fsb load/unload callback very soon though which will give you full control of loading and unloading .fsb files.

Cheers,

  • You must to post comments
Showing 5 results
Your Answer

Please first to submit.