FMOD.DSP.getInfo C# (CSharp) Method

getInfo() public method

public getInfo ( StringBuilder name, uint &version, int &channels, int &configwidth, int &configheight ) : RESULT
name StringBuilder
version uint
channels int
configwidth int
configheight int
return RESULT
        public RESULT getInfo                   (StringBuilder name, out uint version, out int channels, out int configwidth, out int configheight)
        {
            IntPtr nameMem = Marshal.AllocHGlobal(32);
            RESULT result = FMOD_DSP_GetInfo(rawPtr, nameMem, out version, out channels, out configwidth, out configheight);
            StringMarshalHelper.NativeToBuilder(name, nameMem);
            Marshal.FreeHGlobal(nameMem);
            return result;
        }
        public RESULT getType                   (out DSP_TYPE type)

Usage Example

Beispiel #1
0
    // Initializes and returns the FMOD GVR Listener Plugin.
    private static FMOD.DSP Initialize()
    {
        // Search through all busses on in banks.
        int numBanks = 0;

        FMOD.DSP           dsp   = new FMOD.DSP();
        FMOD.Studio.Bank[] banks = null;
        RuntimeManager.StudioSystem.getBankCount(out numBanks);
        RuntimeManager.StudioSystem.getBankList(out banks);
        for (int currentBank = 0; currentBank < numBanks; ++currentBank)
        {
            int numBusses            = 0;
            FMOD.Studio.Bus[] busses = null;
            banks[currentBank].getBusCount(out numBusses);
            banks[currentBank].getBusList(out busses);
            RuntimeManager.StudioSystem.flushCommands();
            for (int currentBus = 0; currentBus < numBusses; ++currentBus)
            {
                // Make sure the channel group of the current bus is assigned properly.
                string busPath = null;
                busses[currentBus].getPath(out busPath);
                RuntimeManager.StudioSystem.getBus(busPath, out busses[currentBus]);
                RuntimeManager.StudioSystem.flushCommands();
                FMOD.ChannelGroup channelGroup;
                busses[currentBus].getChannelGroup(out channelGroup);
                RuntimeManager.StudioSystem.flushCommands();
                if (channelGroup.hasHandle())
                {
                    int numDsps = 0;
                    channelGroup.getNumDSPs(out numDsps);
                    for (int currentDsp = 0; currentDsp < numDsps; ++currentDsp)
                    {
                        channelGroup.getDSP(currentDsp, out dsp);
                        string dspNameSb;
                        int    unusedInt  = 0;
                        uint   unusedUint = 0;
                        dsp.getInfo(out dspNameSb, out unusedUint, out unusedInt, out unusedInt, out unusedInt);
                        if (dspNameSb.ToString().Equals(listenerPluginName) && dsp.hasHandle())
                        {
                            return(dsp);
                        }
                    }
                }
            }
        }
        // Debug.LogError(listenerPluginName + " not found in the FMOD project.");
        return(dsp);
    }