Questions et réponses de la communauté

Bienvenue sur le forum de questions et réponses d'Audiokinetic, propulsé par la communauté. C'est l'endroit où les utilisateurs de Wwise et Strata s'entraident. Pour obtenir une aide directe de notre équipe, veuillez utiliser la page « Tickets de soutien ». Pour signaler un bug, utilisez l'option Bug Report dans l'Audiokinetic Launcher. (Veuillez noter que les rapports de bug soumis au forum questions-réponses seront rejetés. L'utilisation de notre système de rapport de bug dédié garantit que votre rapport est vu par les bonnes personnes et a les meilleures chances d'être corrigé.)

Pour obtenir rapidement les meilleures réponses, suivez ces conseils lorsque vous posez une question :

  • Soyez précis : qu'essayez-vous de réaliser ou quel est le problème spécifique que vous rencontrez ?
  • Pensez à inclure les détails importants : incluez des détails tels que les versions de Wwise et du moteur de jeu, le système d'exploitation, etc.
  • Expliquez ce que vous avez essayé de faire : indiquez aux autres les mesures que vous avez déjà prises pour essayer de résoudre le problème.
  • Concentrez-vous sur les faits : décrivez les aspects techniques de votre problème. Se concentrer sur le problème aide les autres personnes à trouver rapidement une solution.

+1 vote

I wanted to get the volume of sounds played in my unity scene from a wwise meter via output game parameter i called "volume". So i created a wwise Meter effect on my sounds and i created a script on each gameobject that plays those sounds in unity with those lines :

 

int type = (int)RTPCValue_type.RTPCValue_GameObject ;
AkSoundEngine.GetRTPCValue("Volume", gameObject, out volume, ref type) ;
 
 
Unfortunatly the RTPC "Volume" still seems to be global, as even if no sounds are played by the gameobject containing those script lines, the output value "volume" get the RTPC "Volume" number when other sounds containing the wwise meter effect are playing on other gameObjects ...
 
It s like the "RTPCValue_GameObject" would be the same as "RTPCValue_Global" 
 
Any helps ? :)
 
EDIT : Debug.Log(type) returns 1 (which should correspond to "RTPCValue_Global"
 
 
 
dans General Discussion par Florent D. (470 points)
edité par Florent D.

5 Réponses

+1 vote
I'd love to get an answer as well.

Thanks!
par Jean-Edouard M. (370 points)
+1 vote
Well I can answer you jean-Edouard.

It's not a bug, it is just not implemented, the RTPC attached to Meters are global. The only solution we found here is to create one unique RTPC per gameObject. It's a bit annoying but works well...

 

Cheers
par Florent D. (470 points)
+1 vote
 
Meilleure réponse
par Adrien L. (Audiokinetic) (1.1k points)
0 votes

you have to define the in_playingID, try this:

        int type = (int)RTPCValue_type.RTPCValue_GameObject;

        uint pid = (uint)RTPCValue_type.RTPCValue_PlayingID;

 

 

        AkSoundEngine.GetRTPCValue("Volume", this.gameObject, pid, out volume, ref type);

 

then just debug volume ;)

 

par Ratko F. (290 points)
0 votes

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class RTPCListener : MonoBehaviour {


    //set your RTPCID to the name of your desired gameparameter (under GameSyncs)
    public string rtpcID;

    // Update is called once per frame
    void Update () {

        // RTPCValue_type.RTPCValue_Global
        // for whatever reason, this constant isn't exposed by name by WWise C#/Unity headers
        int type = 1;

        // will contain the value of the RTPC parameter after the GetRTPCValue call
        float value;

        // retrieves current value of the RTPC parameter and stores it in 'value'
        AkSoundEngine.GetRTPCValue( rtpcID, gameObject, 0, out value, ref type );

        //
        // use 'value' here
        //
        // e.g. transform.localScale += Vector3( value, 0, 0 );
        // which would scale by the value of the RTPC parameter
}

par Kristina W. (490 points)
...