5 TrackList::TrackList(MWindow *mwindow, long position, int reverse)
8 this->mwindow = mwindow;
11 TrackList::get_playable_audio(long position, int reverse)
13 get_playable_type(position, reverse, TRACK_AUDIO);
16 TrackList::get_playable_video(long position, int reverse)
18 get_playable_type(position, reverse, TRACK_VIDEO);
23 TrackList::get_recordable_audio()
25 get_recordable_type(TRACK_AUDIO);
28 TrackList::get_recordable_video()
30 get_recordable_type(TRACK_VIDEO);
33 TrackList::get_playable_type(long position, int reverse, int data_type)
39 for(current_track = mwindow->tracks->first,
40 current_patch = mwindow->patches->first;
41 current_track && current_patch;
42 current_track = current_track->next,
43 current_patch = current_patch->next)
45 if(current_patch->play && current_track->data_type == data_type)
47 current_auto = current_track->play_autos->autoof(position);
49 // get auto right before position
52 if(current_auto && current_auto->position < position)
53 current_auto = current_auto->next;
57 if(current_auto && current_auto->position > position)
58 current_auto = current_auto->previous;
61 if(!current_auto || current_auto->value == 1)
62 append((ATrack*)current_track);
67 TrackList::get_recordable_type(int data_type)
72 for(current_track = tracks->first, current_patch = patches->first;
73 current_track && current_patch;
74 current_track = current_track->next, current_patch = current_patch->next)
76 if(current_patch->record && current_track->data_type == TRACK_AUDIO)
77 append((ATrack*)current_track);