コミュニティQ&A

Audiokineticのコミュニティ主導のQ&Aフォーラムへようこそ。ここはWwiseとStrataのユーザのみなさまがお互いに協力し合う場です。弊社チームによる直接のサポートをご希望の場合はサポートチケットページをご利用ください。バグを報告するには、Audiokinetic LauncherのBug Reportオプションをご利用ください。(Q&AフォーラムではBug Reportを受け付けておりませんのでご注意ください。専用のBug Reportシステムをご利用いただくことで、バグの報告が適切な担当部門に届き、修正される可能性が高まります。)

最適な回答を迅速に得られるよう、ご質問を投稿される際は以下のヒントをご参考ください。

  • 具体的に示す:何を達成したいのか、またはどんな問題に直面しているのかを具体的に示してください。
  • 重要な詳細情報を含める:Wwiseとゲームエンジンのバージョンやご利用のOSなど詳細情報を記載してください。
  • 試したことを説明する:すでに試してみたトラブルシューティングの手順を教えてください。
  • 事実に焦点を当てる:問題の技術的な事実を記載してください。問題に焦点を当てることで、ほかのユーザのみなさまが解決策を迅速に見つけやすくなります。

+1 支持
I fixed a bug where AkAudioDevice was registering non-local PlayerCameraManagers as default listeners causing multiple issues for listen server players when one or more clients are connected.

I was wondering if there is a public repository to submit a pull request or something so you can merge it in your codebase.

Thank you
Franco P. (110 ポイント) General Discussion

回答 1

0 支持

Hello, this issue was fixed in 2017.1.3 version of the plugin that came out last week.

WG-35104 Fixed: Do not create a listener on a dedicated server.

https://www.audiokinetic.com/library/edge/?source=UE4&id=whatsnew.html

Noemie P. (Audiokinetic) (12.9k ポイント)
That fix is not correct as it only solves the problem with dedicated servers but the problem persists with listen servers.

Instead of checking AsPlayerCameraManager->GetWorld()->AllowAudioPlayback() to decide wether you setup a listener or not for that player camera manager, you should check if the player camera manager owning controller is a local controller or not.

void FAkAudioDevice::OnActorSpawned(AActor* SpawnedActor)
{
    APlayerCameraManager* AsPlayerCameraManager = Cast<APlayerCameraManager>(SpawnedActor);
    if (AsPlayerCameraManager)
    {
        APlayerController* CameraOwner = Cast<APlayerController>(AsPlayerCameraManager->GetOwner());
        if (CameraOwner && CameraOwner->IsLocalPlayerController())
        {
            UAkComponent* pAkComponent = NewObject<UAkComponent>(SpawnedActor);
            if (pAkComponent != nullptr)
            {
                pAkComponent->RegisterComponentWithWorld(SpawnedActor->GetWorld());
                pAkComponent->AttachToComponent(SpawnedActor->GetRootComponent(), FAttachmentTransformRules::KeepWorldTransform, FName());
                AddDefaultListener(pAkComponent);
            }
        }           
    }
}

The actor owner for PlayerCameraManager will always be the owning controller, so you can cast it safely.

This way everything will work as expected. Dedicated servers won't have any listeners. Listen servers will have listeners only for its local players and clients will have listeners only for its local players.
Hey, thanks for the suggestion, I am reopening the issue so that our dev can look at this fix !
I'm happy to help!
...