getDescription() public method

public getDescription ( EventDescription &description ) : RESULT
description EventDescription
return RESULT
    void Start()
    {
        menuState = RuntimeManager.CreateInstance(fmodMenuEvent);
        menuState.start();

        // FMOD Layer ID Caches
        #region
        FMOD.Studio.EventDescription mainEventDescription;
        menuState.getDescription(out mainEventDescription);
        FMOD.Studio.PARAMETER_DESCRIPTION mainParameterDescription;
        mainEventDescription.getParameterDescriptionByName("Main Menu Layer On", out mainParameterDescription);
        mainLayerID = mainParameterDescription.id;

        FMOD.Studio.EventDescription optionsEventDescription;
        menuState.getDescription(out optionsEventDescription);
        FMOD.Studio.PARAMETER_DESCRIPTION optionsParameterDescription;
        optionsEventDescription.getParameterDescriptionByName("Options Layer On", out optionsParameterDescription);
        optionsLayerID = optionsParameterDescription.id;

        FMOD.Studio.EventDescription creditsEventDescription;
        menuState.getDescription(out creditsEventDescription);
        FMOD.Studio.PARAMETER_DESCRIPTION creditsParameterDescription;
        creditsEventDescription.getParameterDescriptionByName("Credits Layer On", out creditsParameterDescription);
        creditsLayerID = creditsParameterDescription.id;
        #endregion
        // End of FMOD Layer ID Caches

        menuState.setParameterByID(optionsLayerID, 1f);
        menuState.setParameterByID(mainLayerID, 1f);
        menuState.setParameterByID(creditsLayerID, 1f);
    }
Beispiel #2
0
 /// <summary>
 /// Checks if the passed eventInstance is 3D or 2D event and sets Bool eventDimension
 /// </summary>
 /// <param name="eventInstance"></param>
 private void is3DEvent(FMOD.Studio.EventInstance eventInstance)
 {
     FMOD.Studio.EventDescription description;
     eventInstance.getDescription(out description);
     description.is3D(out is3Dimensional);
     //Debug.Log("Chosen event is:" + eventDimension);
 }
Beispiel #3
0
    // Start is called before the first frame update
    void Start()
    {
        checkVals    = false;
        oppositeMode = false;

        notesArray = new string[4] {
            "Play_A3", "Play_C4", "Play_E4", "Play_G4"
        };                                                                          //Array of notes to play

        //Expected array pattern
        expArray = new int[4] {
            0, 1, 2, 3
        };

        //Intially set actual array out of number bounds so inccorrect no matter what the expected is
        actArray = new int[4] {
            5, 5, 5, 5
        };
        lastInput = 5;

        //intilising the keypad sound event
        keyPadSound = FMODUnity.RuntimeManager.CreateInstance(keyPadEvent);

        //Intialising the keypad sound parameter
        FMOD.Studio.EventDescription keyPadNoteDescription;
        keyPadSound.getDescription(out keyPadNoteDescription);
        FMOD.Studio.PARAMETER_DESCRIPTION keyPadNoteParameterDescription;
        keyPadNoteDescription.getParameterDescriptionByName("Parameter 1", out keyPadNoteParameterDescription);
        noteTypeParam = keyPadNoteParameterDescription.id;
    }
Beispiel #4
0
    /// <summary>
    /// returns lenght of sound in milliseconds
    /// </summary>
    public static int GetLength(FMOD.Studio.EventInstance event_)
    {
        int lengthms = 0;

        FMOD.Studio.EventDescription ed = null;
        event_.getDescription(out ed);

        ed.getLength(out lengthms);

        return(lengthms);
    }
    private void Start()
    {
        footstepsEv = FMODUnity.RuntimeManager.CreateInstance(footsteps);
        FMODUnity.RuntimeManager.StudioSystem.getParameterDescriptionByName("Material", out MaterialDescription);
        Material_ID = MaterialDescription.id;

        landEv = FMODUnity.RuntimeManager.CreateInstance(land);
        landEv.getDescription(out LandDescription);
        LandDescription.getParameterDescriptionByName("Impact", out ImpactDescription);
        Impact_ID = ImpactDescription.id;
    }
Beispiel #6
0
    void Start()
    {
        musicLevel0000 = FMODUnity.RuntimeManager.CreateInstance(fmodEvent);

        FMOD.Studio.EventDescription segmentCodeEventDescription;
        musicLevel0000.getDescription(out segmentCodeEventDescription);
        FMOD.Studio.PARAMETER_DESCRIPTION segmentCodeParameterDescription;
        segmentCodeEventDescription.getParameterDescriptionByName("segmentCode", out segmentCodeParameterDescription);
        segmentCodeParameterID = segmentCodeParameterDescription.id;

        musicLevel0000.start();
    }
Beispiel #7
0
    // Start is called before the first frame update
    void Start()
    {
        RandomSong = true;
        Repeat     = false;
        StartRandom();

        MusicState = FMODUnity.RuntimeManager.CreateInstance(Songs);

        FMOD.Studio.EventDescription SongEventDescription;
        MusicState.getDescription(out SongEventDescription);
        FMOD.Studio.PARAMETER_DESCRIPTION SongParameterDescription;
        SongEventDescription.getParameterDescriptionByName("Song", out SongParameterDescription);
        SongParameterId = SongParameterDescription.id;

        FMOD.Studio.EventDescription RepeatEventDescription;
        MusicState.getDescription(out RepeatEventDescription);
        FMOD.Studio.PARAMETER_DESCRIPTION RepeatParameterDescription;
        RepeatEventDescription.getParameterDescriptionByName("Repeat", out RepeatParameterDescription);
        RepeatParameterId = RepeatParameterDescription.id;

        MusicState.start();
    }
Beispiel #8
0
    // Start is called before the first frame update
    void Start()
    {
        fmod_hum = FMODUnity.RuntimeManager.CreateInstance(fmodHum);
        FMODUnity.RuntimeManager.AttachInstanceToGameObject(fmod_hum, GetComponent <Transform>(), GetComponent <Rigidbody>());

        // Attach the State between FMOD and this script
        FMOD.Studio.EventDescription state_description;
        fmod_hum.getDescription(out state_description);
        FMOD.Studio.PARAMETER_DESCRIPTION state_parameter_description;
        state_description.getParameterDescriptionByName("State", out state_parameter_description);
        fmod_state_identifier = state_parameter_description.id;


        fmod_hum.start();
    }
Beispiel #9
0
    public FMODAudio3D(SoundHolder3D main, FMOD.Studio.EventInstance sound) : base(main, sound)
    {
        FMOD.Studio.EventDescription description;
        sound.getDescription(out description);

        FMOD.Studio.PARAMETER_DESCRIPTION volume_d, LPF_d;

        description.getParameterDescriptionByName("Volume", out volume_d);
        description.getParameterDescriptionByName("LPF", out LPF_d);

        _volume = volume_d.id;
        _LPF    = LPF_d.id;

        main.OcclusionUpdate += SetOcclusion;
    }
Beispiel #10
0
 private void CreateEventInstance()
 {
     //--------------------------------------------------------------------
     // 4: This shows how to create an instance of an Event and manually
     //    start it.
     //--------------------------------------------------------------------
     windChimeState = FMODUnity.RuntimeManager.CreateInstance(WindChimeEvtName);        //--------------------------------------------------------------------
     //    Cache a handle to the "crazy" parameter for usage in Update()
     //    as shown in (9). Using the handle is much better for performance
     //    than trying to set the parameter by name every update.
     //--------------------------------------------------------------------
     FMOD.Studio.EventDescription WindChimeEvtNameDescription;
     windChimeState.getDescription(out WindChimeEvtNameDescription);
     FMOD.Studio.PARAMETER_DESCRIPTION relVelParameterDescription;
     WindChimeEvtNameDescription.getParameterDescriptionByName(relativeVelParam, out relVelParameterDescription);
     relVelId = relVelParameterDescription.id;
 }
Beispiel #11
0
    void Start()
    {
        cachedRigidBody = GetComponent <Rigidbody>();
        health          = StartingHealth;

        //--------------------------------------------------------------------
        // 4: This shows how to create an instance of an Event and manually
        //    start it.
        //--------------------------------------------------------------------
        playerState = FMODUnity.RuntimeManager.CreateInstance(PlayerStateEvent);
        playerState.start();

        playerIntro = FMODUnity.RuntimeManager.CreateInstance(PlayerIntroEvent);
        playerIntro.start();

        //--------------------------------------------------------------------
        // 5: The RuntimeManager can track Event Instances and update their
        //    positions to match a given Game Object every frame. This is
        //    an easier alternative to manually doing this for every Instance
        //    such as shown in (8).
        //--------------------------------------------------------------------
        FMODUnity.RuntimeManager.AttachInstanceToGameObject(playerIntro, GetComponent <Transform>(), GetComponent <Rigidbody>());

        //--------------------------------------------------------------------
        //    Cache a handle to the "health" parameter for usage in Update()
        //    as shown in (9). Using the handle is much better for performance
        //    than trying to set the parameter by name every update.
        //--------------------------------------------------------------------
        FMOD.Studio.EventDescription healthEventDescription;
        playerState.getDescription(out healthEventDescription);
        FMOD.Studio.PARAMETER_DESCRIPTION healthParameterDescription;
        healthEventDescription.getParameterDescriptionByName("health", out healthParameterDescription);
        healthParameterId = healthParameterDescription.id;

        //--------------------------------------------------------------------
        //    Cache a handle to the "FullHeal" parameter for usage in
        //    ReceiveHealth() as shown in (13). Even though the event instance
        //    is recreated each time it is played, the parameter handle will
        //    always remain the same.
        //--------------------------------------------------------------------
        FMOD.Studio.EventDescription      fullHealEventDescription = FMODUnity.RuntimeManager.GetEventDescription(HealEvent);
        FMOD.Studio.PARAMETER_DESCRIPTION fullHealParameterDescription;
        fullHealEventDescription.getParameterDescriptionByName("FullHeal", out fullHealParameterDescription);
        fullHealthParameterId = fullHealParameterDescription.id;
    }
Beispiel #12
0
    public AudioEventSTInstance(FMOD.Studio.EventInstance instance)
    {
        this.instance = instance;
        instance.getDescription(out description);

        int count;

        description.getLength(out length);
        description.getParameterDescriptionCount(out count);


        for (int i = 0; i < count; i++)
        {
            FMOD.Studio.PARAMETER_DESCRIPTION paramDescription;
            description.getParameterDescriptionByIndex(i, out paramDescription);
            parameters.Add(paramDescription.name, paramDescription.id);
            Debug.Log(paramDescription.name);
        }
    }
    //THE SINGLETON HAS APPEARED: This allows for everything to access this SINGLE INSTANCE of the script and access its variables
    //The drawback is that if this script ever gets destroyed, it's gonna mean everything that relies on the information provided
    //by this script is gonna break.
    //public static FMODVibeTracker vt;

    /*
     * void Awake()
     * {
     *     vt = this;
     * }
     */
    // Start is called before the first frame update
    void Start()
    {
        timelineInfo = new TimelineInfo();

        //Explicitly create the delegate object and assign it to a member so it doesn't get freed
        //by the garbage collected while it's being used
        beatCallback = new FMOD.Studio.EVENT_CALLBACK(BeatEventCallback);

        musicInstance = FMODUnity.RuntimeManager.CreateInstance(music);

        //Pin the class that will store the data modified during the callback
        timelineHandle = GCHandle.Alloc(timelineInfo, GCHandleType.Pinned);
        //Pass the object through the userdata of the instance
        musicInstance.setUserData(GCHandle.ToIntPtr(timelineHandle));

        musicInstance.setCallback(beatCallback, FMOD.Studio.EVENT_CALLBACK_TYPE.TIMELINE_BEAT | FMOD.Studio.EVENT_CALLBACK_TYPE.TIMELINE_MARKER);
        musicInstance.start();

        musicInstance.getDescription(out descriptionCallback);
        descriptionCallback.getLength(out int length);

        timelineInfo.songLength = length;
    }
 public FMODObject(string eventName)
 {
     _audio = FMODUnity.RuntimeManager.CreateInstance(eventName);
     _audio.getDescription(out _info);
     _info.loadSampleData();
 }