pub fn arm(&self, support_auto_arm: bool) {
        if support_auto_arm && self.has_auto_arm_enabled() {
            self.select();
        } else if self.project() == Reaper::get().current_project() {
            unsafe {
                Reaper::get().medium_reaper().csurf_on_rec_arm_change_ex(
                    self.raw(),
                    RecordArmMode::Armed,
                    GangBehavior::DenyGang,
                );
            }
            // If track was auto-armed before, this would just have switched off the auto-arm
            // but not actually armed the track. Therefore we check if it's
            // really armed and if not we do it again.
            let recarm = unsafe {
                Reaper::get()
                    .medium_reaper()
                    .get_media_track_info_value(self.raw(), RecArm)
            };
            #[allow(clippy::float_cmp)]
            {
                if recarm != 1.0 {
                    unsafe {
                        Reaper::get().medium_reaper().csurf_on_rec_arm_change_ex(
                            self.raw(),
                            RecordArmMode::Armed,
                            GangBehavior::DenyGang,
                        );
                    }
                }
            }
        } else {
            // ReaLearn #283
            self.set_prop_enabled(TrackAttributeKey::RecArm, true);
        }
    }
// If supportAutoArm is false, auto-arm mode is disabled if it has been enabled before
If supportAutoArm is false, auto-arm mode is disabled if it has been enabled before
If supportAutoArm is false auto - arm mode is disabled if it has been enabled before
pub fn arm(&self, support_auto_arm: bool) {
        if support_auto_arm && self.has_auto_arm_enabled() {
            self.select();
        } else if self.project() == Reaper::get().current_project() {
            unsafe {
                Reaper::get().medium_reaper().csurf_on_rec_arm_change_ex(
                    self.raw(),
                    RecordArmMode::Armed,
                    GangBehavior::DenyGang,
                );
            }
            // If track was auto-armed before, this would just have switched off the auto-arm
            // but not actually armed the track. Therefore we check if it's
            // really armed and if not we do it again.
            let recarm = unsafe {
                Reaper::get()
                    .medium_reaper()
                    .get_media_track_info_value(self.raw(), RecArm)
            };
            #[allow(clippy::float_cmp)]
            {
                if recarm != 1.0 {
                    unsafe {
                        Reaper::get().medium_reaper().csurf_on_rec_arm_change_ex(
                            self.raw(),
                            RecordArmMode::Armed,
                            GangBehavior::DenyGang,
                        );
                    }
                }
            }
        } else {
            // ReaLearn #283
            self.set_prop_enabled(TrackAttributeKey::RecArm, true);
        }
    }
pub fn arm ( & self , support_auto_arm : bool ) { if support_auto_arm && self . has_auto_arm_enabled ( ) { self . select ( ) ; } else if self . project ( ) == Reaper :: get ( ) . current_project ( ) { unsafe { Reaper :: get ( ) . medium_reaper ( ) . csurf_on_rec_arm_change_ex ( self . raw ( ) , RecordArmMode :: Armed , GangBehavior :: DenyGang , ) ; } // If track was auto-armed before, this would just have switched off the auto-arm // but not actually armed the track. Therefore we check if it's // really armed and if not we do it again. let recarm = unsafe { Reaper :: get ( ) . medium_reaper ( ) . get_media_track_info_value ( self . raw ( ) , RecArm ) } ; # [ allow ( clippy float_cmp ) ] { if recarm != 1.0 { unsafe { Reaper :: get ( ) . medium_reaper ( ) . csurf_on_rec_arm_change_ex ( self . raw ( ) , RecordArmMode :: Armed , GangBehavior :: DenyGang , ) ; } } } } else { // ReaLearn #283 self . set_prop_enabled ( TrackAttributeKey :: RecArm , true ) ; } }
If supportAutoArm is false, auto-arm mode is disabled if it has been enabled before
If supportAutoArm is false auto - arm mode is disabled if it has been enabled before
&self
support_auto_arm
bool
&self
support_auto_arm
bool