private void _loadParameters()
    {
        FMOD.MUSIC_ITERATOR it     = new FMOD.MUSIC_ITERATOR();
        FMOD.RESULT         result = FMOD.RESULT.OK;

        if (m_parameters != null || m_musicSystem == null)
        {
            return;
        }
        m_parameters = new List <FmodMusicParameter>();
        result       = m_musicSystem.getParameters(ref it, "");
        if (result == FMOD.RESULT.OK)
        {
            while (it.value.ToInt32() != 0)
            {
                FMOD.MUSIC_ENTITY  entity = FmodMusicEntityBuilder.getMusicEntity(it);
                FmodMusicParameter param  = new FmodMusicParameter(entity, this);

                m_parameters.Add(param);
            }
        }
        else
        {
            Debug.LogError("FMOD_Unity: Error while loading music parameters: " + FMOD.Error.String(result));
        }
    }
 public void setParameterValue(FmodMusicParameter param, float newVal)
 {
     if (m_musicSystem != null)
     {
         m_musicSystem.setParameterValue((uint)param.Id, newVal);
     }
 }
    public void setParameterValue(string name, float val)
    {
        FmodMusicParameter p = getParameter(name);

        if (p != null)
        {
            p.setValue(val);
        }
    }
    public float getParameterValue(FmodMusicParameter param)
    {
        float ret = 0;

        if (m_musicSystem != null)
        {
            m_musicSystem.getParameterValue((uint)param.Id, ref ret);
        }
        return(ret);
    }
    public float getParameterValue(string name)
    {
        FmodMusicParameter p = getParameter(name);

        if (p != null)
        {
            return(p.getValue());
        }
        return(0);
    }
    private void _loadParameters()
    {
        FMOD.MUSIC_ITERATOR it = new FMOD.MUSIC_ITERATOR();
        FMOD.RESULT result = FMOD.RESULT.OK;

        if (m_parameters != null || m_musicSystem == null) {
            return ;
        }
        m_parameters = new List<FmodMusicParameter>();
        result = m_musicSystem.getParameters(ref it, "");
        if (result == FMOD.RESULT.OK) {
            while (it.value.ToInt32() != 0) {
                FMOD.MUSIC_ENTITY entity = FmodMusicEntityBuilder.getMusicEntity(it);
                FmodMusicParameter param = new FmodMusicParameter(entity, this);

                m_parameters.Add(param);
            }
        } else {
            Debug.LogError("FMOD_Unity: Error while loading music parameters: " + FMOD.Error.String(result));
        }
    }
 public void setParameterValue(FmodMusicParameter param, float newVal)
 {
     if (m_musicSystem != null) {
         m_musicSystem.setParameterValue((uint)param.Id, newVal);
     }
 }
    public float getParameterValue(FmodMusicParameter param)
    {
        float ret = 0;

        if (m_musicSystem != null) {
            m_musicSystem.getParameterValue((uint)param.Id, ref ret);
        }
        return (ret);
    }