1 #include "automation.h"
3 #include "edlsession.h"
6 #include "playabletracks.h"
8 #include "preferences.h"
9 #include "renderengine.h"
13 #include "transportque.h"
16 PlayableTracks::PlayableTracks(RenderEngine *renderengine,
17 long current_position,
22 this->renderengine = renderengine;
23 this->data_type = data_type;
25 //printf("PlayableTracks::PlayableTracks 1 %d\n", renderengine->edl->tracks->total());
26 for(Track *current_track = renderengine->edl->tracks->first;
28 current_track = current_track->next)
30 if(is_playable(current_track, current_position, use_nudge))
32 //printf("PlayableTracks::PlayableTracks 1 %p %d %d\n", this, total, current_position);
33 append(current_track);
36 //printf("PlayableTracks::PlayableTracks %d %d %d\n", data_type, total, current_position);
39 PlayableTracks::~PlayableTracks()
44 int PlayableTracks::is_playable(Track *current_track,
49 int direction = renderengine->command->get_direction();
50 if(use_nudge) position += current_track->nudge;
57 do_channel = renderengine->config->aconfig->do_channel;
60 do_channel = renderengine->config->vconfig->do_channel;
64 if(current_track->data_type != data_type) result = 0;
67 // Track is off screen and not bounced to other modules
72 if(!current_track->plugin_used(position, direction) &&
73 !current_track->channel_is_playable(position, direction, do_channel))
78 if(!current_track->play)
85 // Test for playable edit
86 if(!current_track->playable_edit(position, direction))
88 // Test for playable effect
89 if(!current_track->is_synthesis(renderengine,
102 int PlayableTracks::is_listed(Track *track)
104 for(int i = 0; i < total; i++)
106 if(values[i] == track) return 1;