Support LV2 atom sequence ports alongside old event ports.
[ardour.git] / libs / ardour / export_status.cc
1 /*
2     Copyright (C) 2008 Paul Davis
3     Author: Sakari Bergen
4
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.
9
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.
14
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.
18
19 */
20
21 #include "ardour/export_status.h"
22
23 namespace ARDOUR
24 {
25
26 ExportStatus::ExportStatus ()
27 {
28         init();
29 }
30
31 void
32 ExportStatus::init ()
33 {
34         stop = false;
35         running = false;
36         _aborted = false;
37         _finished = false;
38         _errors = false;
39
40         normalizing = false;
41
42         total_timespans = 0;
43         timespan = 0;
44
45         total_frames = 0;
46         processed_frames = 0;
47
48         total_frames_current_timespan = 0;
49         processed_frames_current_timespan = 0;
50
51         total_normalize_cycles = 0;
52         current_normalize_cycle = 0;
53 }
54
55 void
56 ExportStatus::abort (bool error_occurred)
57 {
58         _aborted = true;
59         _finished = true;
60         _errors = _errors || error_occurred;
61         running = false;
62         Aborting ();
63 }
64
65 void
66 ExportStatus::finish ()
67 {
68         _finished = true;
69         running = false;
70         Finished();
71 }
72
73 } // namespace ARDOUR