2 Copyright (C) 2002-2006 Paul Davis
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #ifndef __ardour_audio_track_h__
21 #define __ardour_audio_track_h__
23 #include "ardour/track.h"
28 class AudioDiskstream;
31 class AudioFileSource;
33 class AudioTrack : public Track
36 AudioTrack (Session&, std::string name, Route::Flag f = Route::Flag (0), TrackMode m = Normal);
39 int set_mode (TrackMode m);
40 bool can_use_mode (TrackMode m, bool& bounce_required);
42 int roll (nframes_t nframes, framepos_t start_frame, framepos_t end_frame,
43 int declick, bool can_record, bool rec_monitors_input, bool& need_butler);
45 void use_new_diskstream ();
46 void set_diskstream (boost::shared_ptr<Diskstream>);
48 DataType data_type () const {
49 return DataType::AUDIO;
52 int export_stuff (BufferSet& bufs, framepos_t start_frame, framecnt_t nframes, bool enable_processing = true);
54 void freeze_me (InterThreadInfo&);
57 boost::shared_ptr<Region> bounce (InterThreadInfo&);
58 boost::shared_ptr<Region> bounce_range (nframes_t start, nframes_t end, InterThreadInfo&, bool enable_processing);
60 int set_state(const XMLNode&, int version);
62 boost::shared_ptr<AudioFileSource> write_source (uint32_t n = 0);
65 boost::shared_ptr<AudioDiskstream> audio_diskstream () const;
66 XMLNode& state (bool full);
68 int _set_state (const XMLNode&, int, bool call_base);
71 int deprecated_use_diskstream_connections ();
72 void set_state_part_two ();
73 void set_state_part_three ();
78 #endif /* __ardour_audio_track_h__ */