X-Git-Url: https://git.cinelerra-gg.org/git/?p=goodguy%2Fcinelerra.git;a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fplayabletracks.C;h=cf98666bb2388b59e65ef3707959e14f17958ff1;hp=6285f3504dd7cfe0f407dc9bc6ae60372d03db14;hb=04293346a5ef49683cfa6ca3a98ef6cbfcdf7732;hpb=033efab12586e8086014c814a5360f211d228ac3 diff --git a/cinelerra-5.1/cinelerra/playabletracks.C b/cinelerra-5.1/cinelerra/playabletracks.C index 6285f350..cf98666b 100644 --- a/cinelerra-5.1/cinelerra/playabletracks.C +++ b/cinelerra-5.1/cinelerra/playabletracks.C @@ -34,35 +34,16 @@ #include "transportque.h" -PlayableTracks::PlayableTracks(EDL *edl, - int64_t current_position, - int direction, - int data_type, - int use_nudge) +PlayableTracks::PlayableTracks(EDL *edl, int64_t current_position, + int direction, int data_type, int use_nudge) : ArrayList() { this->data_type = data_type; - for(Track *current_track = edl->tracks->first; - current_track; - current_track = current_track->next) - { - if(is_playable(current_track, current_position, direction, use_nudge)) - { -// printf("PlayableTracks::PlayableTracks %d this=%p current_track=%p total=%d current_position=%jd\n", -// __LINE__, -// this, -// current_track, -// total, -// current_position); - append(current_track); - } + for( Track *track=edl->tracks->first; track; track=track->next ) { + if( is_playable(track, current_position, direction, use_nudge) ) + append(track); } -// printf("PlayableTracks::PlayableTracks %d data_type=%d total=%d current_position=%jd\n", -// __LINE__, -// data_type, -// total, -// current_position); } PlayableTracks::~PlayableTracks() @@ -70,10 +51,8 @@ PlayableTracks::~PlayableTracks() } -int PlayableTracks::is_playable(Track *current_track, - int64_t position, - int direction, - int use_nudge) +int PlayableTracks::is_playable(Track *current_track, int64_t position, + int direction, int use_nudge) { int result = 1; if(use_nudge) position += current_track->nudge;