diff options
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/ardour/session.h | 2 | ||||
-rw-r--r-- | libs/ardour/diskstream.cc | 2 | ||||
-rw-r--r-- | libs/ardour/filesource.cc | 2 | ||||
-rw-r--r-- | libs/ardour/session.cc | 7 | ||||
-rw-r--r-- | libs/ardour/session_butler.cc | 1 | ||||
-rw-r--r-- | libs/ardour/session_export.cc | 2 | ||||
-rw-r--r-- | libs/ardour/session_midi.cc | 2 | ||||
-rw-r--r-- | libs/ardour/session_state.cc | 7 | ||||
-rw-r--r-- | libs/ardour/session_transport.cc | 14 |
9 files changed, 24 insertions, 15 deletions
diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index a422e52d3d..1e25c5f38b 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -320,7 +320,7 @@ class Session : public sigc::trackable, public Stateful bool record_enabling_legal () const; void maybe_enable_record (); - void disable_record (bool force = false); + void disable_record (bool rt_context, bool force = false); void step_back_from_record (); sigc::signal<void> going_away; diff --git a/libs/ardour/diskstream.cc b/libs/ardour/diskstream.cc index b5bb83ee78..5e1f8251c7 100644 --- a/libs/ardour/diskstream.cc +++ b/libs/ardour/diskstream.cc @@ -452,8 +452,6 @@ DiskStream::setup_destructive_playlist () { AudioRegion::SourceList srcs; - cerr << "setting up destructive playlist with " << channels.size() << " channels\n"; - for (ChannelList::iterator chan = channels.begin(); chan != channels.end(); ++chan) { srcs.push_back ((*chan).write_source); } diff --git a/libs/ardour/filesource.cc b/libs/ardour/filesource.cc index bb14d31757..d4f728c13b 100644 --- a/libs/ardour/filesource.cc +++ b/libs/ardour/filesource.cc @@ -1417,7 +1417,7 @@ FileSource::repair (string path, jack_nframes_t rate) goto out; } - if (memcmp (&buf[0], "RIFF", 4) || memcmp (&buf[8], "WAVE", 4) || memcmp (&buf[0], "RIFX", 4)) { + if ((memcmp (&buf[0], "RIFF", 4) && memcmp (&buf[0], "RIFX", 4)) || memcmp (&buf[8], "WAVE", 4)) { /* no header. too dangerous to proceed */ goto out; } diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 9b581ce790..71270f5e35 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -1268,7 +1268,7 @@ Session::enable_record () } void -Session::disable_record (bool force) +Session::disable_record (bool rt_context, bool force) { RecordState rs; @@ -1299,7 +1299,10 @@ Session::disable_record (bool force) } RecordStateChanged (); /* emit signal */ - remove_pending_capture_state (); + + if (!rt_context) { + remove_pending_capture_state (); + } } } diff --git a/libs/ardour/session_butler.cc b/libs/ardour/session_butler.cc index cf97e47803..ec543f8fa1 100644 --- a/libs/ardour/session_butler.cc +++ b/libs/ardour/session_butler.cc @@ -214,6 +214,7 @@ Session::butler_thread_work () case ButlerRequest::Wake: break; + case ButlerRequest::Run: butler_should_run = true; break; diff --git a/libs/ardour/session_export.cc b/libs/ardour/session_export.cc index 0ccea59b81..677b2c1258 100644 --- a/libs/ardour/session_export.cc +++ b/libs/ardour/session_export.cc @@ -508,7 +508,7 @@ Session::prepare_to_export (AudioExportSpecification& spec) /* make sure we are actually rolling */ if (get_record_enabled()) { - disable_record (); + disable_record (false); } _exporting = true; diff --git a/libs/ardour/session_midi.cc b/libs/ardour/session_midi.cc index b2b1d263a7..1ac7d9e300 100644 --- a/libs/ardour/session_midi.cc +++ b/libs/ardour/session_midi.cc @@ -637,7 +637,7 @@ void Session::mmc_record_exit (MIDI::MachineControl &mmc) { if (mmc_control) { - disable_record (); + disable_record (false); } } diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index 6a42c0e4d1..58f1d7c0a0 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -765,8 +765,11 @@ Session::load_state (string snapshot_name) /* there is pending state from a crashed capture attempt */ if (AskAboutPendingState()) { + cerr << "use pending state\n"; state_was_pending = true; - } + } else { + cerr << "do not use pending state\n"; + } } if (!state_was_pending) { @@ -1270,7 +1273,7 @@ Session::get_template() sources in their state node. */ - disable_record (); + disable_record (false); return state(false); } diff --git a/libs/ardour/session_transport.cc b/libs/ardour/session_transport.cc index e2a9f23890..2f9f8257f9 100644 --- a/libs/ardour/session_transport.cc +++ b/libs/ardour/session_transport.cc @@ -189,7 +189,7 @@ Session::realtime_stop (bool abort) _clear_event_type (Event::RangeStop); _clear_event_type (Event::RangeLocate); - disable_record (); + disable_record (true); reset_slave_state (); @@ -282,9 +282,9 @@ Session::non_realtime_stop (bool abort) struct tm* now; time_t xnow; bool did_record; - + did_record = false; - + for (DiskStreamList::iterator i = diskstreams.begin(); i != diskstreams.end(); ++i) { if ((*i)->get_captured_frames () != 0) { did_record = true; @@ -405,8 +405,12 @@ Session::non_realtime_stop (bool abort) save_state ("", true); } - /* save the current state of things if appropriate */ + /* always try to get rid of this */ + + remove_pending_capture_state (); + /* save the current state of things if appropriate */ + if (did_record) { save_state (_current_snapshot_name); } @@ -835,7 +839,7 @@ Session::start_transport () break; case Recording: - disable_record (); + disable_record (false); break; default: |