i load the examples.fev
ive called createSound with FMOD_CREATESTREAM on the streaming_bank.fsb with no errors, and then i pass the [out] FMOD::Sound* to preloadFSB with a streaminstance of 0.
however when i call getEvent on "examples/AdvancedTechniques/MultiChannelMusic" with FMOD_EVENT_ERROR_ON_DISKACCESS, i get the unwanted file access error.
i dont get this issue when i follow the same chain of commands with the tutorial_bank.fsb.
i understand that streaming entails disk access, does this mean that FMOD_EVENT_ERROR_ON_DISKACCESS will always trigger for any stream? or is it meant to catch the loading of fev/fsb data other than the streaming data itself?
- infiniteinteractive asked 8 years ago
the docs state "If EventGroup::loadEventData has accidently been forgotten this flag will return an FMOD_ERR_FILE_UNWANTED if the getEvent function tries to load data".
the implication being that the unwanted file access error is intended to flag use of an unloaded resource.
i might have read too much into that, but i presumed that meant that preloadFSB was sufficient to satisfy the condition of relevant data being loaded for the event with and without streams.
is there any chance this function might be changed to distinguish between the case of a stream accessing the stream data, and a stream that hasn’t been loaded/preloaded?
because a stream accessing data from disk is a fairly trivial assumption, so that error code or event mode doesnt add much information to the case of stream loading.
- infiniteinteractive answered 8 years ago
To re post from previous email thead:
You’re most likely not preloading FSB for all possible stream instances.
Look in the wave bank settings in the .fdp, see what the ‘max streams’
property is set to, and preload that many fsbs by repeatedly calling createStream on the same filename multiple times,and each time passing a different streaminstance parameter to preloadFSB.
If you have it set to 2 for example (make sure it is a low number rather than the default) then create 2 streams, and call preloadFSB twice, using stream and stream with streaminstance parameter 0 and 1.
This should be enough to avoid disk access.
Currently streaming events will return FMOD_ERR_FILE_UNWANTED regardless of whether or not their instances are preloaded.
[quote:26ztuzle]because a stream accessing data from disk is a fairly trivial assumption, so that error code or event mode doesnt add much information to the case of stream loading.[/quote:26ztuzle]
You make a good point, we will discuss this internally and let you know what we come up with.
[quote:3vzsa6yb]i understand that streaming entails disk access, does this mean that FMOD_EVENT_ERROR_ON_DISKACCESS will always trigger for any stream?[/quote:3vzsa6yb]
Yes that is correct. The disk access used for the stream causes the ERR_DISK_UNWANTED error.
Please login first to submit.