menu
 

La section Questions et réponses de la communauté Audiokinetic est un forum où les utilisateurs de Wwise et de Strata peuvent poser des questions et répondre à celles des autres membres de la communauté. Si vous souhaitez obtenir une réponse de la part de l'équipe de soutien technique d'Audiokinetic, veillez à utiliser le formulaire de Tickets de Soutien.

0 votes

Edit:
I found the problem - inside the PostEventAtLocation stack, at FAkAudioDevice::PostEventAtLocation, line 2319 of the default UE4 integration code, the game object is unregistered, without giving us a chance to set RTPC values on it. Changing this post to feature requests so a variant of the PostEventAtLocation can be made that gives us control over this.
Thanks!

Hello!

How do I use SetRTPCValueByPlayingID? This was my approach and it's erroring:


// Post event (sound plays correctly)
static FString EventName = ""; // Don't know what to pass here
AkPlayingID PlayingID = UAkGameplayStatics::PostEventAtLocation(      // resulting PlayingID is not AK_INVALID_PLAYING_ID
    AudioEvent, // This is a valid UAkAudioEvent* type
    PlayLocation,
    FRotator::ZeroRotator,
    EventName,
    GetWorld()
);

 

// Set RTPC
if (FAkAudioDevice* AudioDevice = FAkAudioDevice::Get())
{
    const bool IsEventsPlayingIDActive = AudioDevice->IsPlayingIDActive(AudioEvent->ShortID, PlayingID);    // IsEventsPlayingIDActive is true

    
    AkRtpcID RTPC_Id = AudioDevice->GetIDFromString(FString("PlayerSpeed"));      // RTPC_Id reads 1493153371 and is not AK_INVALID_RTPC_ID
    AudioDevice->SetRTPCValueByPlayingID(RTPC_Id, My_RTCP_Value, PlayingID, 0);      
// This errors and prints "Unknown game object ID. Make sure the game object is registered before using it and do not use it once it was unregistered.: 2"
}

I don't know what to make of this error, what am I doing wrong? Is this even possible, or do I have to use an AkComponent?


 

dans Feature Requests par Vioxtar (370 points)
edité par Vioxtar

1 Réponse

0 votes
Hey, just for reference, you can use SpawnAkComponentAtLocation to solve this. It will allow you to set switches or RTPC values on the component, and then fire the event.
par Robert K. (140 points)
...