I am trying to use preloadFSB() and FMOD_OPENMEMORY_POINT to get fmod to use sound assets that we have loaded into memory. It consistently gives this error, however, whenever I call createSound() to create the sound that will get passed into preloadFSB():
"Can’t use FMOD_OPENMEMORY_POINT on non PCM source data, or non
mp3/xma/adpcm data if FMOD_CREATECOMPRESSEDSAMPLE was used."
I am not specifying this is a compressed sample, and I have verified via getFormat() calls that all sounds in the sound bank file are 16 bit PCM encoded. I can use FMOD_OPENMEMORY and the createSound() returns with result FMOD_OK. The trouble with this scheme is that I have to free the data that we loaded since fmod at this point has its own copy, leading to time lost redundantly copying as well as possible fragmentation issues from creating and destroying numerous variably sized buffers. I’d much rather just have fmod use the data from the memory buffer we loaded it into.
Anyone else ever seen anything like this?
- BruceC asked 8 years ago
- You must login to post comments