I have a few suggestions for loading optimizations that would greatly improve the loading performance of FMOD.
Let me explain a little…
My engine "insomnia" ([url:3pflruhv]http://www.evi1m3.com/insomnia/devdiary.php[/url:3pflruhv]) is using Load in place strategy and is loaded with all resources in [b:3pflruhv]under a second[/b:3pflruhv] (~30MB of resources, mesh, textures, animations, sounds, dynamics, dialogs etc) on PC and Xbox360.
All resources are separated in two groups
– [b:3pflruhv]Direct[/b:3pflruhv]: loaded in memory initially in one read
– [b:3pflruhv]Streamable[/b:3pflruhv]: loaded on request
Now I added the FMOD sound support and I’m [b:3pflruhv]very satisfied[/b:3pflruhv] with runtime performance and features.
The thing that is really bugging me is loading. FMOD have a very inefficient user loading support and in some geometry case very bad creation design.
1) Sound that I want to have as a [i:3pflruhv]direct [/i:3pflruhv]resources (already in memory) are copied again into FMOD memory causing a speed penalty (memory copy) and memory penalty.
2) Geometry creation (with addPolygon function) is extremely slow.
3) Streamable sounds with user file system (set with setFileSystem) are not working. The FMOD is looping only a small chunk of a sound.
I’m using FMOD for only 3 days now so please [u:3pflruhv]let me know if I overlooked the functionality that I’m requesting[/u:3pflruhv] (in that case – my bad and sorry guys).
In the case that my remarks make sense I compiled a short list of suggestions:
1) Modify creation routines (or just add flag) to work with user memory (but no local copy please) – this will optimize loading speeds and memory requirement.
2) Add a function to FMOD::Geometry to retrieve and restore geometry to and from user memory. This will greatly optimize loading speeds.
3) Per polygon FMOD::Geometry settings is an overkill – it would be enough to have a single setting per FMOD::Geometry and create multiple geometries for different settings (like a textures in rendering).
Let me know what you think.
- evi1m3 asked 11 years ago
1.) As a1psx noted, FMOD_OPENMEMORY_POINT does what you want with memory.
2.) If you want to load geometry from a saved file on disk (or from a memory buffer), you can create the geometry once, call Geometry::save() to save the file (or, rather, the memory buffer), and then call System::loadGeometry() to load it from a buffer. Also, if you want, you can simplify the geometry for the purposes of sound occlusion – you’re not obligated to use the exact geometry you use in-game. We do our own occlusion processing, so I can’t give too much advice here.
3.) We use setFileSystem() and streamed sounds just fine. Without more details about what you’re doing, I can’t guess what the problem is. Make sure that you’ve implemented all of the callbacks properly, and that you’re offsetting the file reads properly. Also make sure that you’re returning the correct FMOD_RESULT values.
Hope that helps
- Adiss answered 11 years ago
Please login first to submit.