社区问答

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

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

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

+10 投票
We have an issue of streaming media does not play after leaving a level. This issue can reproduce by a clean UE4.27.1 + wwise 2021.4.7707 project.

Our environment are listed below:
Environment
    Windows 10

    wwise 2021.1.4.7707

    Unreal 4.27.1 Release from Epic Launcher

    Use Event-Based Packaging is true

 

Reproduce Steps:

1.We created two music tracks in wwise. The one is set to streaming (Audio1), and the other is set to non streaming (Audio2).

2.Create two maps in UE4. The Map1 plays Audio1 when level starts; the Map2 plays Audio2 when level starts.

3.Play with Standalone game starts with Map1. Audio1 is played.
4. Use console command open Map2 to travel the map to Map2. Audio2 is played.

5. Use console command open Map1 to travel the map to Map1. Audio1 is not played. The log shows:

LogAkAudio: Error: Cannot open file: 411434698

LogAkAudio: Error: Failed creating source: 411434698

6. Use console command open Map2 to travel the map to Map2. Audio2 is played.

 

Notes:

In step1. Not only music track, Sound SFX does not works also if the media is set to stream.

In step3. Only Play in editor works well without any issue. However, packaged game and standalone game in editor do not works.

 

Please let me know if you have already know this issue or have a fix for this.

Thank you.
分类:General Discussion | 用户: windkey k. (200 分)

1个回答

+3 投票
We also had this issue.  The problem we found is that any streamed media that is not flagged to be prefetched won't have bIsMediaSet set to true at any point.

Here is snippet of the change we made to UAkMediaAsset::LoadAndSetMedia() to fix this issue:

    auto& DataChunk = MediaAssetData->DataChunks[0];
    if (MediaAssetData->IsStreamed && !DataChunk.IsPrefetch)
    {
        FAkUnrealIOHook::AddStreamingMedia(this);
        LoadRefCount.Increment();

        // This flag was not being set on streamed media, causing
        // UAkMediaAsset::IsReadyForFinishDestroy to follow the wrong path during GC which
        // would prevent FAkUnrealIOHook::RemoveStreamingMedia from being called. After
        // this failure, the media asset would no longer stream properly. This flag would
        // normally be set by UAkMediaAsset::DoSetMedia however this is not run for
        // non-prefetch, streamed media due to this early out.
        bIsMediaSet = true;

        return;
    }
用户: John M. (200 分)
修改于 用户:John M.
Thank you! I am happy to confirm that this works.
Adding the prefetch flag on a streamed music track fixes my "failed play" issue, will try your solution thank you!
...