FMOD.Studio.EventInstance.getChannelGroup C# (CSharp) Method

getChannelGroup() public method

public getChannelGroup ( FMOD &group ) : RESULT
group FMOD
return RESULT
        public RESULT getChannelGroup(out FMOD.ChannelGroup group)
        {
            group = null;

            IntPtr groupraw = new IntPtr();
            RESULT result = FMOD_Studio_EventInstance_GetChannelGroup(rawPtr, out groupraw);
            if (result != RESULT.OK)
            {
                return result;
            }

            group = new FMOD.ChannelGroup(groupraw);

            return result;
        }
        public RESULT release()

Usage Example

    private void GetSpectrumData()
    {
        System.IntPtr _data;
        uint          _length;

        _dsp.getParameterData(2, out _data, out _length);
        _fftparam = (FMOD.DSP_PARAMETER_FFT)Marshal.PtrToStructure(_data, typeof(FMOD.DSP_PARAMETER_FFT));


        if (_fftparam.numchannels == 0)
        {
            SongPlaylist.getChannelGroup(out _channelGroup);
            _channelGroup.addDSP(0, _dsp);
        }
        else if (_fftparam.numchannels >= 1)
        {
            for (int s = 0; s < _windowSize; s++)
            {
                float _totalChannelData = 0f;
                for (int c = 0; c < _fftparam.numchannels; c++)
                {
                    _totalChannelData += _fftparam.spectrum[c][s];
                }
                _samples[s] = _totalChannelData / _fftparam.numchannels;
            }
        }
    }
All Usage Examples Of FMOD.Studio.EventInstance::getChannelGroup
EventInstance