diff --git a/libs/ardour/ardour/audio_diskstream.h b/libs/ardour/ardour/audio_diskstream.h index bbf218b4de..70691f7e3f 100644 --- a/libs/ardour/ardour/audio_diskstream.h +++ b/libs/ardour/ardour/audio_diskstream.h @@ -157,7 +157,6 @@ class AudioDiskstream : public Diskstream void set_block_size (pframes_t); int internal_playback_seek (framecnt_t distance); int can_internal_playback_seek (framecnt_t distance); - int rename_write_sources (); std::list > steal_write_sources(); void reset_write_sources (bool, bool force = false); void non_realtime_input_change (); diff --git a/libs/ardour/ardour/diskstream.h b/libs/ardour/ardour/diskstream.h index c6651473e5..aae7c276f3 100644 --- a/libs/ardour/ardour/diskstream.h +++ b/libs/ardour/ardour/diskstream.h @@ -173,7 +173,6 @@ class Diskstream : public SessionObject, public PublicDiskstream virtual int overwrite_existing_buffers () = 0; virtual int internal_playback_seek (framecnt_t distance) = 0; virtual int can_internal_playback_seek (framecnt_t distance) = 0; - virtual int rename_write_sources () = 0; virtual void reset_write_sources (bool, bool force = false) = 0; virtual void non_realtime_input_change () = 0; diff --git a/libs/ardour/ardour/midi_diskstream.h b/libs/ardour/ardour/midi_diskstream.h index aea60dc3bf..019b621bdd 100644 --- a/libs/ardour/ardour/midi_diskstream.h +++ b/libs/ardour/ardour/midi_diskstream.h @@ -127,7 +127,6 @@ class MidiDiskstream : public Diskstream void set_block_size (pframes_t); int internal_playback_seek (framecnt_t distance); int can_internal_playback_seek (framecnt_t distance); - int rename_write_sources (); std::list > steal_write_sources(); void reset_write_sources (bool, bool force = false); void non_realtime_input_change (); diff --git a/libs/ardour/audio_diskstream.cc b/libs/ardour/audio_diskstream.cc index 335e263898..326efb21c3 100644 --- a/libs/ardour/audio_diskstream.cc +++ b/libs/ardour/audio_diskstream.cc @@ -1909,23 +1909,6 @@ AudioDiskstream::reset_write_sources (bool mark_write_complete, bool /*force*/) } } -int -AudioDiskstream::rename_write_sources () -{ - ChannelList::iterator chan; - boost::shared_ptr c = channels.reader(); - uint32_t n; - - for (chan = c->begin(), n = 0; chan != c->end(); ++chan, ++n) { - if ((*chan)->write_source != 0) { - (*chan)->write_source->set_source_name (_name.val(), destructive()); - /* XXX what to do if one of them fails ? */ - } - } - - return 0; -} - void AudioDiskstream::set_block_size (pframes_t /*nframes*/) { diff --git a/libs/ardour/diskstream.cc b/libs/ardour/diskstream.cc index bba28eeacd..69c83e30a1 100644 --- a/libs/ardour/diskstream.cc +++ b/libs/ardour/diskstream.cc @@ -38,6 +38,7 @@ #include "pbd/basename.h" #include "pbd/memento_command.h" #include "pbd/xml++.h" +#include "pbd/stacktrace.h" #include "ardour/ardour.h" #include "ardour/audioengine.h" @@ -180,8 +181,10 @@ Diskstream::set_track (Track* t) ic_connection.disconnect(); _io->changed.connect_same_thread (ic_connection, boost::bind (&Diskstream::handle_input_change, this, _1, _2)); - input_change_pending.type = IOChange::Type (IOChange::ConfigurationChanged|IOChange::ConnectionsChanged); - non_realtime_input_change (); + if (_io->n_ports() != ChanCount::ZERO) { + input_change_pending.type = IOChange::Type (IOChange::ConfigurationChanged|IOChange::ConnectionsChanged); + non_realtime_input_change (); + } _track->Destroyed.connect_same_thread (*this, boost::bind (&Diskstream::route_going_away, this)); } @@ -454,18 +457,9 @@ Diskstream::set_name (const string& str) if (_name != str) { assert(playlist()); playlist()->set_name (str); - SessionObject::set_name(str); - - if (!in_set_state && recordable()) { - /* rename existing capture files so that they have the correct name */ - return rename_write_sources (); - } else { - return false; - } } - - return true; + return true; } XMLNode& diff --git a/libs/ardour/graph.cc b/libs/ardour/graph.cc index 0403053bab..18ea19d0bc 100644 --- a/libs/ardour/graph.cc +++ b/libs/ardour/graph.cc @@ -460,7 +460,7 @@ Graph::main_thread() again: _callback_start_sem.wait (); - DEBUG_TRACE(DEBUG::Graph, "main thread is awake\n"); + DEBUG_TRACE(DEBUG::ProcessThreads, "main thread is awake\n"); if (_quit_threads) { return; @@ -470,12 +470,12 @@ Graph::main_thread() if (_graph_empty && !_quit_threads) { _callback_done_sem.signal (); - DEBUG_TRACE(DEBUG::Graph, "main thread sees graph done, goes back to slee\n"); + DEBUG_TRACE(DEBUG::ProcessThreads, "main thread sees graph done, goes back to slee\n"); goto again; } while (1) { - DEBUG_TRACE(DEBUG::Graph, "main thread runs one graph node\n"); + DEBUG_TRACE(DEBUG::ProcessThreads, "main thread runs one graph node\n"); if (run_one()) { break; } @@ -527,7 +527,7 @@ Graph::silent_process_routes (pframes_t nframes, framepos_t start_frame, framepo _process_need_butler = false; if (!_graph_empty) { - DEBUG_TRACE(DEBUG::Graph, "wake graph for silent process\n"); + DEBUG_TRACE(DEBUG::ProcessThreads, "wake graph for silent process\n"); _callback_start_sem.signal (); _callback_done_sem.wait (); } @@ -541,7 +541,7 @@ int Graph::process_routes (pframes_t nframes, framepos_t start_frame, framepos_t end_frame, int declick, bool can_record, bool rec_monitors_input, bool& need_butler) { - DEBUG_TRACE (DEBUG::Graph, string_compose ("graph execution from %1 to %2 = %3\n", start_frame, end_frame, nframes)); + DEBUG_TRACE (DEBUG::ProcessThreads, string_compose ("graph execution from %1 to %2 = %3\n", start_frame, end_frame, nframes)); _process_nframes = nframes; _process_start_frame = start_frame; @@ -555,11 +555,11 @@ Graph::process_routes (pframes_t nframes, framepos_t start_frame, framepos_t end _process_retval = 0; _process_need_butler = false; - DEBUG_TRACE(DEBUG::Graph, "wake graph for non-silent process\n"); + DEBUG_TRACE(DEBUG::ProcessThreads, "wake graph for non-silent process\n"); _callback_start_sem.signal (); _callback_done_sem.wait (); - DEBUG_TRACE (DEBUG::Graph, "graph execution complete\n"); + DEBUG_TRACE (DEBUG::ProcessThreads, "graph execution complete\n"); need_butler = _process_need_butler; @@ -570,7 +570,7 @@ int Graph::routes_no_roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame, bool non_rt_pending, bool can_record, int declick) { - DEBUG_TRACE (DEBUG::Graph, string_compose ("no-roll graph execution from %1 to %2 = %3\n", start_frame, end_frame, nframes)); + DEBUG_TRACE (DEBUG::ProcessThreads, string_compose ("no-roll graph execution from %1 to %2 = %3\n", start_frame, end_frame, nframes)); _process_nframes = nframes; _process_start_frame = start_frame; @@ -584,7 +584,7 @@ Graph::routes_no_roll (pframes_t nframes, framepos_t start_frame, framepos_t end _process_retval = 0; _process_need_butler = false; - DEBUG_TRACE(DEBUG::Graph, "wake graph for no-roll process\n"); + DEBUG_TRACE(DEBUG::ProcessThreads, "wake graph for no-roll process\n"); _callback_start_sem.signal (); _callback_done_sem.wait (); diff --git a/libs/ardour/import.cc b/libs/ardour/import.cc index 5dbc146291..ca4f45dcef 100644 --- a/libs/ardour/import.cc +++ b/libs/ardour/import.cc @@ -443,13 +443,15 @@ write_midi_data_to_new_files (Evoral::SMF* source, ImportStatus& status, if (status.cancel) { break; } + } else { + warning << string_compose (_("Track %1 of %2 contained no usable MIDI data"), i, source->file_path()) << endmsg; } ++s; // next source } } catch (...) { - error << "Corrupt MIDI file " << source->file_path() << endmsg; + error << string_compose (_("MIDI file %1 was not readable (no reason available"), source->file_path()) << endmsg; } if (buf) { diff --git a/libs/ardour/midi_diskstream.cc b/libs/ardour/midi_diskstream.cc index 3889d79dfb..44f284b272 100644 --- a/libs/ardour/midi_diskstream.cc +++ b/libs/ardour/midi_diskstream.cc @@ -36,7 +36,6 @@ #include "pbd/memento_command.h" #include "pbd/enumwriter.h" #include "pbd/stateful_diff_command.h" -#include "pbd/stacktrace.h" #include "ardour/ardour.h" #include "ardour/audioengine.h" @@ -164,8 +163,10 @@ MidiDiskstream::non_realtime_input_change () if (input_change_pending.type & IOChange::ConfigurationChanged) { if (_io->n_ports().n_midi() != _n_channels.n_midi()) { - error << "Can not feed " << _io->n_ports() - << " ports to " << _n_channels << " channels" + error << string_compose (_("%1: I/O configuration change %4 requested to use %2, but channel setup is %3"), + name(), + _io->n_ports(), + _n_channels, input_change_pending.type) << endmsg; } } @@ -1354,16 +1355,6 @@ MidiDiskstream::reset_write_sources (bool mark_write_complete, bool /*force*/) use_new_write_source (0); } -int -MidiDiskstream::rename_write_sources () -{ - if (_write_source != 0) { - _write_source->set_source_name (_name.val(), destructive()); - /* XXX what to do if this fails ? */ - } - return 0; -} - void MidiDiskstream::set_block_size (pframes_t /*nframes*/) { diff --git a/libs/ardour/session_process.cc b/libs/ardour/session_process.cc index 5d2cbb6180..e05240e6e3 100644 --- a/libs/ardour/session_process.cc +++ b/libs/ardour/session_process.cc @@ -108,7 +108,7 @@ Session::no_roll (pframes_t nframes) } if (route_graph->threads_in_use() > 0) { - DEBUG_TRACE(DEBUG::Graph,"calling graph/no-roll\n"); + DEBUG_TRACE(DEBUG::ProcessThreads,"calling graph/no-roll\n"); route_graph->routes_no_roll( nframes, _transport_frame, end_frame, non_realtime_work_pending(), actively_recording(), declick); } else { for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { @@ -154,7 +154,7 @@ Session::process_routes (pframes_t nframes, bool& need_butler) tracks, the graph never gets updated. */ if (1 || route_graph->threads_in_use() > 0) { - DEBUG_TRACE(DEBUG::Graph,"calling graph/process-routes\n"); + DEBUG_TRACE(DEBUG::ProcessThreads,"calling graph/process-routes\n"); route_graph->process_routes( nframes, start_frame, end_frame, declick, record_active, rec_monitors, need_butler); } else { diff --git a/libs/ardour/track.cc b/libs/ardour/track.cc index 1ac3d69dd9..0d7bf9ea98 100644 --- a/libs/ardour/track.cc +++ b/libs/ardour/track.cc @@ -180,9 +180,7 @@ Track::set_name (const string& str) return false; } - if (_diskstream->set_name (str)) { - return false; - } + _diskstream->set_name (str); /* save state so that the statefile fully reflects any filename changes */