Community Q&A

Welcome to Audiokinetic’s community-driven Q&A forum. This is the place where Wwise and Strata users help each other out. For direct help from our team, please use the Support Tickets page. To report a bug, use the Bug Report option in the Audiokinetic Launcher. (Note that Bug Reports submitted to the Q&A forum will be rejected. Using our dedicated Bug Report system ensures your report is seen by the right people and has the best chance of being fixed.)

To get the best answers quickly, follow these tips when posting a question:

  • Be Specific: What are you trying to achieve, or what specific issue are you running into?
  • Include Key Details: Include details like your Wwise and game engine versions, operating system, etc.
  • Explain What You've Tried: Let others know what troubleshooting steps you've already taken.
  • Focus on the Facts: Describe the technical facts of your issue. Focusing on the problem helps others find a solution quickly.

0 votes

I'm trying to grab the Wwise SFX bands in UE5.5 and subsequently visualize him, and I know he needs to use the

AK::SoundEngine::GetSourcePlayPosition

as well as initializing the sound Engine , I've done most of the things but the code always returns AK_PlayingIDNotFound in the Can you help me to solve why?

This is my SoundSubSystem

void UWwiseSubsystem::Initialize(FSubsystemCollectionBase& Collection)
{
    Super::Initialize(Collection);
    //Init Memory Engine
    AkMemSettings MemSettings;
    AK::MemoryMgr::GetDefaultSettings(MemSettings);
    AK::MemoryMgr::Init(&MemSettings);
    AkStreamMgrSettings StreamMgrSettings;
    AK::StreamMgr::GetDefaultSettings(StreamMgrSettings);
    AK::StreamMgr::Create(StreamMgrSettings);
    AkInitSettings InitSettings;
    AkPlatformInitSettings PlatformInitSettings;
    AK::SoundEngine::GetDefaultInitSettings(InitSettings);
    AK::SoundEngine::GetDefaultPlatformInitSettings(PlatformInitSettings);
    AKRESULT Result = AK::SoundEngine::Init(&InitSettings, &PlatformInitSettings);
    GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Green, FString::Printf(TEXT("Init Sound Engine : %d"), Result));
}

This is my Component.

int32 UWwiseComponent::GetWwisePlayPosition(int32 playingID)
{
    if (playingID == AK_INVALID_PLAYING_ID)
    {
       UE_LOG(LogTemp, Error, TEXT("Invalid playing ID."));
       return -1;
    }

    if (!AK::SoundEngine::IsInitialized())
    {
       UE_LOG(LogTemp, Error, TEXT("Wwise Sound Engine is not initialized."));
       return -1;
    }
    AkPlayingID playID = playingID;
    AkTimeMs position = 0;
    auto result = AK::SoundEngine::GetSourcePlayPosition(playID, &position);
    
    if (result != AK_Success)
    {
       UE_LOG(LogTemp, Error, TEXT("Failed to get position for Playing ID: %d. Error: %d"), playingID, result);
       return result;
    }

    UE_LOG(LogTemp, Log, TEXT("Current Play Position for Playing ID %d: %d ms"), playingID, position);
    return position;
in General Discussion by の こと (100 points)

Please sign-in or register to answer this question.

...