fn fx_from_parm_fx_index(
        &self,
        track: &Track,
        parm_fx_index: VersionDependentTrackFxLocation,
        param_index: Option<u32>,
        param_value: Option<ReaperNormalizedFxParamValue>,
    ) -> Option<Fx> {
        use VersionDependentTrackFxLocation::*;
        match parm_fx_index {
            Old(index) => {
                let is_input_fx = self.is_probably_input_fx(track, index, param_index, param_value);
                let fx_chain = if is_input_fx {
                    track.input_fx_chain()
                } else {
                    track.normal_fx_chain()
                };
                fx_chain.fx_by_index(index)
            }
            New(fx_ref) => track.fx_by_query_index(fx_ref.to_raw()),
        }
    }
// From REAPER > 5.95, parmFxIndex should be interpreted as query index. For earlier versions
// it's a normal index
// - which unfortunately doesn't contain information if the FX is on the normal FX chain or the
//   input FX chain.
// In this case a heuristic is applied to determine which chain it is. It gets more accurate
// when paramIndex and paramValue are supplied.
From REAPER > 5.95, parmFxIndex should be interpreted as query index. For earlier versions
it's a normal index
which unfortunately doesn't contain information if the FX is on the normal FX chain or the
input FX chain.
In this case a heuristic is applied to determine which chain it is. It gets more accurate
when paramIndex and paramValue are supplied.
From REAPER > 5 . 95 parmFxIndex should be interpreted as query index . For earlier versions it ' s a normal index which unfortunately doesn ' t contain information if the FX is on the normal FX chain or the input FX chain . In this case a heuristic is applied to determine which chain it is . It gets more accurate when paramIndex and paramValue are supplied .
fn fx_from_parm_fx_index(
        &self,
        track: &Track,
        parm_fx_index: VersionDependentTrackFxLocation,
        param_index: Option<u32>,
        param_value: Option<ReaperNormalizedFxParamValue>,
    ) -> Option<Fx> {
        use VersionDependentTrackFxLocation::*;
        match parm_fx_index {
            Old(index) => {
                let is_input_fx = self.is_probably_input_fx(track, index, param_index, param_value);
                let fx_chain = if is_input_fx {
                    track.input_fx_chain()
                } else {
                    track.normal_fx_chain()
                };
                fx_chain.fx_by_index(index)
            }
            New(fx_ref) => track.fx_by_query_index(fx_ref.to_raw()),
        }
    }
fn fx_from_parm_fx_index ( & self , track : & Track , parm_fx_index : VersionDependentTrackFxLocation , param_index : Option < u32 > , param_value : Option < ReaperNormalizedFxParamValue > , ) -> Option < Fx > { use VersionDependentTrackFxLocation :: * ; match parm_fx_index { Old ( index ) => { let is_input_fx = self . is_probably_input_fx ( track , index , param_index , param_value ) ; let fx_chain = if is_input_fx { track . input_fx_chain ( ) } else { track . normal_fx_chain ( ) } ; fx_chain . fx_by_index ( index ) } New ( fx_ref ) => track . fx_by_query_index ( fx_ref . to_raw ( ) ) , } }
From REAPER > 5.95, parmFxIndex should be interpreted as query index.
From REAPER > 5 . 95 parmFxIndex should be interpreted as query index .
&self
track
&Track
parm_fx_index
VersionDependentTrackFxLocation
param_index
Option<u32>
param_value
Option<ReaperNormalizedFxParamValue>
&self
track
&Track
parm_fx_index
VersionDependentTrackFxLocation
param_index
Option<u32>
param_value
Option<ReaperNormalizedFxParamValue>