2 Copyright (C) 2006 Paul Davis
3 Written by Dave Robillard
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #ifndef __ardour_midi_track_h__
21 #define __ardour_midi_track_h__
23 #include <ardour/track.h>
33 class MidiTrack : public Track
36 MidiTrack (Session&, string name, Route::Flag f = Route::Flag (0), TrackMode m = Normal);
37 MidiTrack (Session&, const XMLNode&);
40 int set_name (string str, void *src);
42 int roll (jack_nframes_t nframes, jack_nframes_t start_frame, jack_nframes_t end_frame,
43 jack_nframes_t offset, int declick, bool can_record, bool rec_monitors_input);
45 int no_roll (jack_nframes_t nframes, jack_nframes_t start_frame, jack_nframes_t end_frame,
46 jack_nframes_t offset, bool state_changing, bool can_record, bool rec_monitors_input);
48 int silent_roll (jack_nframes_t nframes, jack_nframes_t start_frame, jack_nframes_t end_frame,
49 jack_nframes_t offset, bool can_record, bool rec_monitors_input);
51 void process_output_buffers (BufferSet& bufs,
52 jack_nframes_t start_frame, jack_nframes_t end_frame,
53 jack_nframes_t nframes, jack_nframes_t offset, bool with_redirects, int declick,
56 void set_record_enable (bool yn, void *src);
58 MidiDiskstream& midi_diskstream() const;
60 int use_diskstream (string name);
61 int use_diskstream (const PBD::ID& id);
63 void set_mode (TrackMode m);
65 void set_latency_delay (jack_nframes_t);
67 int export_stuff (BufferSet& bufs,
68 jack_nframes_t nframes, jack_nframes_t end_frame);
70 void freeze (InterThreadInfo&);
73 void bounce (InterThreadInfo&);
74 void bounce_range (jack_nframes_t start, jack_nframes_t end, InterThreadInfo&);
76 int set_state(const XMLNode& node);
78 bool record_enabled() const;
81 XMLNode& state (bool full);
83 void passthru_silence (jack_nframes_t start_frame, jack_nframes_t end_frame,
84 jack_nframes_t nframes, jack_nframes_t offset, int declick,
87 ChanCount n_process_buffers ();
90 int set_diskstream (MidiDiskstream&);
92 void set_state_part_two ();
93 void set_state_part_three ();
96 } /* namespace ARDOUR*/
98 #endif /* __ardour_midi_track_h__ */