cleanup confused mess related to jack_port_type_get_buffer_size()
[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         progress = 0.0;
41         normalizing = false;
42
43         total_timespans = 0;
44         timespan = 0;
45
46         total_frames = 0;
47         processed_frames = 0;
48 }
49
50 void
51 ExportStatus::abort (bool error_occurred)
52 {
53         _aborted = true;
54         _finished = true;
55         _errors = _errors || error_occurred;
56         running = false;
57         Aborting ();
58 }
59
60 void
61 ExportStatus::finish ()
62 {
63         _finished = true;
64         running = false;
65         Finished();
66 }
67
68 } // namespace ARDOUR