prevent new session construction if not connected to JACK
git-svn-id: svn://localhost/ardour2/trunk@1495 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
6129d2bd1b
commit
92aaa4ebc9
@ -1684,6 +1684,12 @@ ARDOUR_UI::new_session (std::string predetermined_path)
|
||||
string session_name;
|
||||
string session_path;
|
||||
|
||||
if (!engine->connected()) {
|
||||
MessageDialog msg (_("Ardour is not connected to JACK at this time. Creating new sessions is not possible."));
|
||||
msg.run ();
|
||||
return;
|
||||
}
|
||||
|
||||
int response = Gtk::RESPONSE_NONE;
|
||||
|
||||
new_session_dialog->set_modal(true);
|
||||
@ -1693,6 +1699,13 @@ ARDOUR_UI::new_session (std::string predetermined_path)
|
||||
|
||||
do {
|
||||
response = new_session_dialog->run ();
|
||||
|
||||
if (!engine->connected()) {
|
||||
new_session_dialog->hide ();
|
||||
MessageDialog msg (_("Ardour is no longer connected to JACK. Creating a new session is not possible."));
|
||||
msg.run ();
|
||||
return;
|
||||
}
|
||||
|
||||
_session_is_new = false;
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -269,6 +269,10 @@ Session::Session (AudioEngine &eng,
|
||||
{
|
||||
bool new_session;
|
||||
|
||||
if (!eng.connected()) {
|
||||
throw failed_constructor();
|
||||
}
|
||||
|
||||
cerr << "Loading session " << fullpath << " using snapshot " << snapshot_name << " (1)" << endl;
|
||||
|
||||
n_physical_outputs = _engine.n_physical_outputs();
|
||||
@ -327,6 +331,10 @@ Session::Session (AudioEngine &eng,
|
||||
{
|
||||
bool new_session;
|
||||
|
||||
if (!eng.connected()) {
|
||||
throw failed_constructor();
|
||||
}
|
||||
|
||||
cerr << "Loading session " << fullpath << " using snapshot " << snapshot_name << " (2)" << endl;
|
||||
|
||||
n_physical_outputs = _engine.n_physical_outputs();
|
||||
|
Loading…
Reference in New Issue
Block a user