Our xma-encoded wave files are put in banks, much like the FSB format, to get them playing I need to provide the name of the bank, set in exinfo.fileoffset, set the length, and they’ll play just fine (i’m even aligning the streaming ones to start aligned on 32768 bytes, so you’ll get the optimum speed on the DVD-R drives).
But everytime I have to provide a filename, now that’s a bit of waste of memory for us. We have internal filesystem, which in it’s debug version used to keep the filenames of every file opened. Intentionally that memory is preallocated, so in debug it would use more as each filename might be up to 256 bytes. In release we are not using it.
Now with FMOD I have to enable that all the time, as FMOD requires name…
So would it be possible for FMOD to be able to get that information from a native file handle (that would be HANDLE in Win32, and “int” for unixes). stdio’s FILE* seems too high level for example.
Another thing which comes to mind, is that if filename instead of handle is given, this means that on Win32 CreateFile must be called, and if you are running off a DVD it would try to find the file and open it (which might slow down the things a bit). As I’ve already opened that file, and have it’s handle, I can just give it to you and that’s it.
Probably internally you should duplicate that handle (every platform I know supports something like that) to avoid problems like premature closing of the handle, calling of a synchronous function (seek, read, instead of aio_read or ReadFileEx OVERLAPPED), etc.
Please take into consideration ;)… Something like FMOD_FILEHANDLE
- You must login to post comments