社区问答

欢迎来到 Audiokinetic 社区问答论坛。在此,Wwise 和 Strata 用户可互帮互助。如需我们团队直接提供协助,请前往技术支持申请单页面。若要报告问题,请在 Audiokinetic Launcher 中选择“报告错误”选项(注意,问答论坛并不会接收错误报告)。我们内部设有专门的错误报告系统,会有专人查看报告并设法解决问题。

要想尽快得到满意的解答,请在提问时注意以下几点:

  • 描述尽量具体:比如,想达到什么样的目的,或者具体哪里有问题。
  • 包含关键细节:比如,Wwise 和游戏引擎版本以及所用操作系统等等。
  • 阐明所做努力:阐明自己为了排除故障都采取了哪些措施。
  • 聚焦问题本身:聚焦于问题本身的相关技术细节,以便别人可以快速找到解决方案。

0 投票

Wwise SDK 2016.1.1.5823

Following Method 4 in "Strategies for Managing SoundBanks", I am unable to successfully prepare media.  I have done the following:

Create new sounds, events, game-syncs, and a new soundbank.  Uncheck the "Media" checkbox for the sound bank.  Generate banks and it comes up with many errors about "media referenced by ... not found in any SoundBank", this should be fine.  The media files still end up as new loose .WEM files in the output directory.

I load my new 'Events & Structures'-only bank at startup so that the events can be located.  I then initiate a call to PrepareEvent on one of the events in that bank.

At this point, I hit a breakpoint in my AK::StreamMgr::IAkFileLocationResolver::Open(AkFileID, AkOpenMode, AkFileSystemFlags*, bool&, AkFileDesc&) override.  The parameters passed don't seem to be correct.

First off, the AkFileID is wrong.  It's not the ID for any of the .WEM files, but instead it's the ID of the soundbank that I created.  I found that ID in SoundbanksInfo.xml.

Secondly, the AkFileSystemFlags passed has uCodecID == AKCODECID_BANK.  In both AkFileLocationResolver example code, and our own implementation, this is used to determine if we sprintf the AkFileID to "%u.bnk" or "%u.wem".  This is making it look for a .bnk, not a .wem.

As a result, this incorrect file information coming through the file resolver causes low-level file size/open operations to fail and no media is ever loaded.

Are there any intermediate steps, either in code, or authoring that need to be done in addition to the setup described here?  While the documentation doesn't give step-by-step, I think I followed the information fairly accurately, but what I'm seeing is that preparing my event stored in a no-media bank seems to cause Wwise to ask for a BNK file, when it should be looking for several loose-media WEM files.

Thanks,

Eric

分类:General Discussion | 用户: Eric P. (100 分)
I have come across this as well. My .bnk file is already loaded through different methods then passed to Wwise. There should be no need for the Wwise to hit the disk again for this. In our case this fails because we don't have loose .bnk files in our packaged builds.

Eric, did you manage to solve this? We're on Wwise 2016.2.4 and this is still an issue.
Hi Jon,

Yes, I was able to debug this further and it came down to the specific overload of AK::SoundEngine::LoadBank that we were using.  I suspect you may be using the same.  The one we use to load banks is this one:

https://www.audiokinetic.com/library/edge/?source=SDK&id=namespace_a_k_1_1_sound_engine_ac89797e873ca78fd0256c91720eca65c.html

So we get the file size and allocate some memory ahead of time, then pass the address and size to the LoadBank function.  After a long support thread with Audiokinetic the realization was that using this form of LoadBank affects how media is looked up later.  They said they would fix the docs, but I'm not certain if they did.  We did some tests with sample code and prepare events worked as they should.  The only difference was the LoadBank api.

tl;dr - Use the forms of LoadBank where you pass in an AkBankID or name if you want prepare events to work.

Eric
Thanks Eric. You're absolutely correct, we are also using the same LoadBank method as you were. Switching this out for this LoadBank variant fixed it for us;

AKRESULT __cdecl AK::SoundEngine::LoadBank  ( const void *  in_pInMemoryBankPtr,  
  AkUInt32  in_uInMemoryBankSize,  
  AkMemPoolId  in_uPoolForBankMedia,  
  AkBankID &  out_bankID   
 )

Thank you so much for your speedy reply. I didn't realise this LoadBank method existed, so the fix also saved us some memory!

Please sign-in or register to answer this question.

...