OS: Windows 7 Professional (64bit)
FMOD Version: 4.35.05 Development (32bit)
Development Tool: Visual Studio 2008 SP1 (VC++)
I am trying to load a ".fev" file from memory.
I have succeeded to load a ".fev" file, but I couldn’t get an event.
When I call a function "FMOD_EventGroup_GetEventByIndex()",
it returns an error code "FMOD_ERR_FILE_NOTFOUND".
I think that this function tries to load a ".fsb" file from disk.
But, there is no problem when I directly load a ".fev" from disk.
loadInfo.size = sizeof(FMOD_EVENT_LOADINFO);
loadInfo.loadfrommemory_length = pFile->GetSize(); // "pFile" has data of ".fev" file from disk
FMOD_RESULT result = FMOD_OK;
result = ::FMOD_EventSystem_Load(GetEventSystem(), pFile->GetData(), &loadInfo, NULL);
result = ::FMOD_EventSystem_GetGroup(GetEventSystem(), "Test/SE", FALSE, &pEventGroup);
int numEvents = 0;
result = ::FMOD_EventGroup_GetNumEvents(pEventGroup, &numEvents);
for (int i = 0; i < numEvents; i++)
FMOD_EVENT* pEvent = NULL;
result = ::FMOD_EventGroup_GetEventByIndex(pEventGroup, i, FMOD_EVENT_DEFAULT, &pEvent);
What should I do for success?
And can I load a ".fsb" file from memory too?
(I need to pack all sound files into one packed file)
- hebikun asked 5 years ago
I have succeeded to get an event when I load a ".fev" file from memory by your solution.
(The sound files are not packed)
And I have looked at the load_from_memory example, but I can’t find a good solution about my needs.
I am using a event system.
So I call a function "FMOD_EventGroup_GetEventByIndex()" or "FMOD_EventGroup_GetEvent()" for getting an event.
If ".fsb" files in a packed file, and I need to load it from memory,
how get I an event by above functions?
Hi hebikun, welcome to the FMOD Forum.
It sounds like the problem is that it can’t find the FSB, you should be able to fix that by setting the media path. Yes you can load the FSB from memory as well, take a look at the load_from_memory example.
Please login first to submit.