Audiokinetic's Community Q&A is the forum where users can ask and answer questions within the Wwise and Strata communities. If you would like to get an answer from Audiokinetic's Technical support team, make sure you use the Support Tickets page.

PrepareEvent cannot open loose media files

+1 vote

Hi,

I'm trying to use the PrepareEvent calls to load individual sounds when needed to avoid making hundreds of tiny SoundBanks.  At this point I'm fairly certain I'm handling the API calls correctly, as the Wwise profiler shows that it is trying to load the correct file, but it fails with a "Cannot open file" error.  I understand that to use PrepareEvent, the media needs to be excluded from the banks that have the metadata. The information on how to do this in the documentation is a bit scattered around, so please let me know if I missed something.

-I allocated a 16MB (more than enough for this one file I'm testing with) pool for prepared events

-I excluded the media from said bank, and copied it to the Bank directory that is included in the game.

-I (just in case) set the audiosrc path to the bank directory, even though i don't think that was necessary

-I loaded the bank with the relevant metadata successfully.  I've tried using both LoadBank and PrepareBank(Structure_Only)

-I called PrepareEvent with an array of 2 events, "ambience_bathroom_play" and "ambience_bathroom_stop". 

-Wwise fails this claiming "Cannot open file <fileID>"

-The .wem file it is looking for is sitting in the banks folder along with the parent bank I loaded earlier

-The xml doc shows this fileID corresponds to ambience_bathroom.wav, so it is looking for the correct media

Is there another step I may have missed.  I've read through all the relevant material on Preparing Events and saw nothing about how to specify where Wwise should be looking for the loose media, but everything looks like it is where it should be.

Thanks

related to an answer for: PrepareEvent fails to load media
asked Feb 26, 2016 in General Discussion by Miles F. (250 points)

2 Answers

0 votes
This problem still exists now
answered Nov 21, 2019 by Kang C. (150 points)
0 votes
我也遇到了这个报错,是不是原来有同名的bank.asset,我删除了原有的同名bank.asset后,重新生成就不再报错了
answered Mar 26, 2022 by 同学 (140 points)
...