X-Git-Url: http://git.cinelerra-gg.org/git/?p=goodguy%2Fhistory.git;a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fedl.C;h=7298baa32cac604c0548507e0c171122114a05ae;hp=a27e10cc5e37a287c5244ea22f222945a92ec035;hb=243336668c89096732786c6b3f3c5918aa2eff26;hpb=0513350234a8dcd08e5a0117d5121724ef7b76b6 diff --git a/cinelerra-5.1/cinelerra/edl.C b/cinelerra-5.1/cinelerra/edl.C index a27e10cc..7298baa3 100644 --- a/cinelerra-5.1/cinelerra/edl.C +++ b/cinelerra-5.1/cinelerra/edl.C @@ -825,19 +825,15 @@ void EDL::set_outpoint(double position) } } -void EDL::deglitch(double position) -{ - if( !session->cursor_on_frames ) return; - Track *current_track = tracks->first; - for( ; current_track; current_track=current_track->next ) { - if( !current_track->record ) continue; - if( current_track->data_type != TRACK_AUDIO ) continue; - ATrack *atrack = (ATrack*)current_track; - atrack->deglitch(position, - session->labels_follow_edits, - session->plugins_follow_edits, - session->autos_follow_edits); - } +void EDL::unset_inoutpoint() +{ + local_session->unset_inpoint(); + local_session->unset_outpoint(); +} + +int EDL::blade(double position) +{ + return tracks->blade(position); } int EDL::clear(double start, double end, @@ -1329,15 +1325,20 @@ void EDL::get_shared_tracks(Track *track, } } -// Convert position to frames if cursor alignment is enabled +// aligned frame time +double EDL::frame_align(double position, int round) +{ + double frame_pos = position * session->frame_rate; + frame_pos = (int64_t)(frame_pos + (round ? 0.5 : 1e-6)); + position = frame_pos / session->frame_rate; + return position; +} + +// Convert position to frames if alignment is enabled. double EDL::align_to_frame(double position, int round) { - if( session->cursor_on_frames && session->frame_rate > 0 ) { - double frame_no = position * session->frame_rate; - int64_t frame_pos = frame_no + (round ? 0.5 : 1e-6); - double pos = frame_pos / session->frame_rate; - if( !EQUIV(pos, position) ) position = pos; - } + if( session->cursor_on_frames ) + position = frame_align(position, round); return position; }