public setParameterFloat ( int index, float value ) : RESULT | ||
index | int | |
value | float | |
Résultat | RESULT |
public static EqualizerBand GetEqualizerBand(FMOD.System system, bool isActive, float centerValue, float bandwithValue, float gainValue) { FMOD.DSP dspParamEq = null; if (isActive) { if (!system.createDSPByType(FMOD.DSP_TYPE.PARAMEQ, out dspParamEq).ERRCHECK()) { return(null); } FMOD.ChannelGroup masterChannelGroup; if (!system.getMasterChannelGroup(out masterChannelGroup).ERRCHECK()) { return(null); } int numDSPs; if (!masterChannelGroup.getNumDSPs(out numDSPs).ERRCHECK()) { return(null); } if (!masterChannelGroup.addDSP(numDSPs, dspParamEq).ERRCHECK()) { return(null); } if (!dspParamEq.setParameterFloat((int)FMOD.DSP_PARAMEQ.CENTER, centerValue).ERRCHECK()) { return(null); } if (!dspParamEq.setParameterFloat((int)FMOD.DSP_PARAMEQ.BANDWIDTH, bandwithValue).ERRCHECK()) { return(null); } if (!dspParamEq.setParameterFloat((int)FMOD.DSP_PARAMEQ.GAIN, gainValue).ERRCHECK()) { return(null); } if (!dspParamEq.setActive(true).ERRCHECK()) { return(null); } } var band = new EqualizerBand(system, dspParamEq, centerValue, gainValue, isActive); return(band); }
public void SetSpeed(float speed) { decimal speedDec = Convert.ToDecimal(speed); speedDec = Math.Round(speedDec, 1); speed = (float)speedDec; if (Channel != null) { Channel.setFrequency(_defaultFrequency * speed); _pitchShift.setParameterFloat(PITCH_INDEX, 1.0f / speed); } Speed = speed; }