Merged with trunk R920.
[ardour.git] / gtk2_ardour / export_session_dialog.cc
1 /*
2     Copyright (C) 2006 Paul Davis
3     Author: Andre Raue
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_ui.h"
22 #include "export_session_dialog.h"
23
24
25 ExportSessionDialog::ExportSessionDialog (PublicEditor& editor) 
26         : ExportDialog(editor)
27 {
28 }
29         
30         
31 void 
32 ExportSessionDialog::export_audio_data ()
33 {
34         if (getSession().start_audio_export (spec)) {
35                 return;
36         }
37
38         gtk_main_iteration ();
39         while (spec.running) {
40                 if (gtk_events_pending()) {
41                         gtk_main_iteration ();
42                 } else {
43                         usleep (10000);
44                 }
45         }
46 }
47
48
49 void
50 ExportSessionDialog::set_range (jack_nframes_t start, jack_nframes_t end)
51 {       
52         ExportDialog::set_range (start, end);
53         
54         // XXX: this is a hack until we figure out what is really wrong
55         getSession().request_locate (spec.start_frame, false);
56 }