diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2007-02-23 04:19:16 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2007-02-23 04:19:16 +0000 |
commit | 92aaa4ebc96c51873b9bd2468e5ac2caeb42d7bd (patch) | |
tree | 897ea4309692fc4585be971253afefc48d14e374 /gtk2_ardour/export_range_markers_dialog.cc | |
parent | 6129d2bd1b15fa90e38886ca48109a3f79c5991a (diff) |
prevent new session construction if not connected to JACK
git-svn-id: svn://localhost/ardour2/trunk@1495 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/export_range_markers_dialog.cc')
-rw-r--r-- | gtk2_ardour/export_range_markers_dialog.cc | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/gtk2_ardour/export_range_markers_dialog.cc b/gtk2_ardour/export_range_markers_dialog.cc index 85c5efe4f2..2a1e2a9af4 100644 --- a/gtk2_ardour/export_range_markers_dialog.cc +++ b/gtk2_ardour/export_range_markers_dialog.cc @@ -171,13 +171,11 @@ ExportRangeMarkersDialog::init_progress_computing(Locations::LocationList& locat Location *currentLocation = (*locationIter); if(currentLocation->is_range_marker()){ - range_markers_durations_aggregated.push_back( - duration_before_current_location); + range_markers_durations_aggregated.push_back (duration_before_current_location); - nframes_t duration = - currentLocation->end() - currentLocation->start(); + nframes_t duration = currentLocation->end() - currentLocation->start(); - range_markers_durations.push_back(duration); + range_markers_durations.push_back (duration); duration_before_current_location += duration; } } @@ -190,14 +188,18 @@ gint ExportRangeMarkersDialog::progress_timeout () { double progress = 0.0; + + cerr << "Progress timeout, total = " << total_duration << " index = " << current_range_marker_index + << " current = " << range_markers_durations[current_range_marker_index] + << " agg = " << range_markers_durations_aggregated[current_range_marker_index] + << " prog = " << spec.progress + << endl; - if(current_range_marker_index >= range_markers_durations.size()){ + if (current_range_marker_index >= range_markers_durations.size()){ progress = 1.0; - } - else{ - progress = - ((double) range_markers_durations_aggregated[current_range_marker_index] + - (spec.progress * (double) range_markers_durations[current_range_marker_index])) / + } else{ + progress = ((double) range_markers_durations_aggregated[current_range_marker_index] + + (spec.progress * (double) range_markers_durations[current_range_marker_index])) / (double) total_duration; } |