pub fn new(media_track: MediaTrack, rea_project: Option<ReaProject>) -> Track {
        Track {
            media_track: Cell::new(Some(media_track)),
            rea_project: {
                let actual = rea_project.or_else(|| get_track_project_raw(media_track));
                Cell::new(actual)
            },
            // We load the GUID eagerly because we want to make comparability possible even in the
            // following case: Track A has been initialized with a GUID not been loaded
            // yet, track B has been initialized with a MediaTrack* (this constructor)
            // but has rendered invalid in the meantime. Now there would not be any way to compare
            // them because I can neither compare MediaTrack* pointers nor GUIDs. Except
            // I extract the GUID eagerly.
            guid: get_media_track_guid(media_track),
        }
    }
/// mediaTrack must not be null
/// reaProject can be null but providing it can speed things up quite much for REAPER versions <
/// 5.95
mediaTrack must not be null
reaProject can be null but providing it can speed things up quite much for REAPER versions <
5.95
mediaTrack must not be null reaProject can be null but providing it can speed things up quite much for REAPER versions < 5 . 95
pub fn new(media_track: MediaTrack, rea_project: Option<ReaProject>) -> Track {
        Track {
            media_track: Cell::new(Some(media_track)),
            rea_project: {
                let actual = rea_project.or_else(|| get_track_project_raw(media_track));
                Cell::new(actual)
            },
            // We load the GUID eagerly because we want to make comparability possible even in the
            // following case: Track A has been initialized with a GUID not been loaded
            // yet, track B has been initialized with a MediaTrack* (this constructor)
            // but has rendered invalid in the meantime. Now there would not be any way to compare
            // them because I can neither compare MediaTrack* pointers nor GUIDs. Except
            // I extract the GUID eagerly.
            guid: get_media_track_guid(media_track),
        }
    }
pub fn new ( media_track : MediaTrack , rea_project : Option < ReaProject > ) -> Track { Track { media_track : Cell :: new ( Some ( media_track ) ) , rea_project : { let actual = rea_project . or_else ( | | get_track_project_raw ( media_track ) ) ; Cell :: new ( actual ) } , // We load the GUID eagerly because we want to make comparability possible even in the // following case: Track A has been initialized with a GUID not been loaded // yet, track B has been initialized with a MediaTrack* (this constructor) // but has rendered invalid in the meantime. Now there would not be any way to compare // them because I can neither compare MediaTrack* pointers nor GUIDs. Except // I extract the GUID eagerly. guid : get_media_track_guid ( media_track ) , } }
mediaTrack must not be null
reaProject can be null but providing it can speed things up quite much for REAPER versions <
5.95
mediaTrack must not be null reaProject can be null but providing it can speed things up quite much for REAPER versions < 5 . 95
media_track
MediaTrack
rea_project
Option<ReaProject>
media_track
MediaTrack
rea_project
Option<ReaProject>