diff --git a/gtk2_ardour/ardour.desktop.in b/gtk2_ardour/ardour.desktop.in index 1770bda8bf..faf28a78ca 100644 --- a/gtk2_ardour/ardour.desktop.in +++ b/gtk2_ardour/ardour.desktop.in @@ -8,3 +8,5 @@ MimeType=application/x-ardour; Type=Application Categories=AudioVideo;Audio;AudioEditing;X-Recorders;X-Multitrack;X-Jack; StartupWMClass=Ardour +X-NSM-Capable=true +X-NSM-Exec=@ARDOUR_EXEC@ diff --git a/gtk2_ardour/editor_canvas.cc b/gtk2_ardour/editor_canvas.cc index e204f9bf14..aaae956974 100644 --- a/gtk2_ardour/editor_canvas.cc +++ b/gtk2_ardour/editor_canvas.cc @@ -445,11 +445,11 @@ Editor::drop_paths_part_two (const vector& paths, timepos_t const & p, d /* drop onto canvas background: create new tracks */ InstrumentSelector is(InstrumentSelector::ForTrackDefault); // instantiation builds instrument-list and sets default. - do_import (midi_paths, Editing::ImportDistinctFiles, ImportAsTrack, SrcBest, SMFTrackNumber, SMFTempoIgnore, pos, is.selected_instrument()); + do_import (midi_paths, Editing::ImportDistinctFiles, ImportAsTrack, SrcBest, SMFFileAndTrackName, SMFTempoIgnore, pos, is.selected_instrument()); if (UIConfiguration::instance().get_only_copy_imported_files() || copy) { do_import (audio_paths, Editing::ImportDistinctFiles, Editing::ImportAsTrack, - SrcBest, SMFTrackName, SMFTempoIgnore, pos); + SrcBest, SMFFileAndTrackName, SMFTempoIgnore, pos); } else { do_embed (audio_paths, Editing::ImportDistinctFiles, ImportAsTrack, pos); } @@ -460,11 +460,11 @@ Editor::drop_paths_part_two (const vector& paths, timepos_t const & p, d if (tv->track()) { do_import (midi_paths, Editing::ImportSerializeFiles, ImportToTrack, - SrcBest, SMFTrackNumber, SMFTempoIgnore, pos, std::shared_ptr(), tv->track ()); + SrcBest, SMFFileAndTrackName, SMFTempoIgnore, pos, std::shared_ptr(), tv->track ()); if (UIConfiguration::instance().get_only_copy_imported_files() || copy) { do_import (audio_paths, Editing::ImportSerializeFiles, Editing::ImportToTrack, - SrcBest, SMFTrackName, SMFTempoIgnore, pos, std::shared_ptr(), tv->track ()); + SrcBest, SMFFileAndTrackName, SMFTempoIgnore, pos, std::shared_ptr(), tv->track ()); } else { do_embed (audio_paths, Editing::ImportSerializeFiles, ImportToTrack, pos, std::shared_ptr(), tv->track ()); } diff --git a/gtk2_ardour/editor_sources.cc b/gtk2_ardour/editor_sources.cc index dfeebc1a86..3d6a38a8bb 100644 --- a/gtk2_ardour/editor_sources.cc +++ b/gtk2_ardour/editor_sources.cc @@ -294,7 +294,7 @@ EditorSources::drag_data_received (const RefPtr& context, if (UIConfiguration::instance ().get_only_copy_imported_files () || copy) { _editor->do_import (paths, Editing::ImportDistinctFiles, Editing::ImportAsRegion, - SrcBest, SMFTrackNumber, SMFTempoIgnore, pos); + SrcBest, SMFFileAndTrackName, SMFTempoIgnore, pos); } else { _editor->do_embed (paths, Editing::ImportDistinctFiles, Editing::ImportAsRegion, pos); } diff --git a/gtk2_ardour/export_dialog.cc b/gtk2_ardour/export_dialog.cc index ef466f4305..113a295da7 100644 --- a/gtk2_ardour/export_dialog.cc +++ b/gtk2_ardour/export_dialog.cc @@ -423,7 +423,7 @@ ExportDialog::show_progress () for (auto const& x : _files_to_reimport) { timepos_t pos (x.first); Editing::ImportDisposition disposition = Editing::ImportDistinctFiles; - editor.do_import (x.second, disposition, Editing::ImportAsTrack, SrcBest, SMFTrackNumber, SMFTempoIgnore, pos); + editor.do_import (x.second, disposition, Editing::ImportAsTrack, SrcBest, SMFFileAndTrackName, SMFTempoIgnore, pos); } } diff --git a/gtk2_ardour/themes/adwaita_dark-livetrax.colors b/gtk2_ardour/themes/adwaita_dark-livetrax.colors index 0e8521660f..6468ba8faf 100644 --- a/gtk2_ardour/themes/adwaita_dark-livetrax.colors +++ b/gtk2_ardour/themes/adwaita_dark-livetrax.colors @@ -326,7 +326,7 @@ - + diff --git a/gtk2_ardour/themes/blueberry_milk-livetrax.colors b/gtk2_ardour/themes/blueberry_milk-livetrax.colors index 24916c5943..67647d1be9 100644 --- a/gtk2_ardour/themes/blueberry_milk-livetrax.colors +++ b/gtk2_ardour/themes/blueberry_milk-livetrax.colors @@ -317,7 +317,7 @@ - + diff --git a/gtk2_ardour/themes/caineville-livetrax.colors b/gtk2_ardour/themes/caineville-livetrax.colors index 65a3c074aa..4a124783d6 100644 --- a/gtk2_ardour/themes/caineville-livetrax.colors +++ b/gtk2_ardour/themes/caineville-livetrax.colors @@ -318,7 +318,7 @@ - + diff --git a/gtk2_ardour/themes/captain_light-ardour.colors b/gtk2_ardour/themes/captain_light-ardour.colors index fb29b03025..e84afef2c0 100644 --- a/gtk2_ardour/themes/captain_light-ardour.colors +++ b/gtk2_ardour/themes/captain_light-ardour.colors @@ -58,7 +58,7 @@ - + @@ -324,7 +324,7 @@ - + diff --git a/gtk2_ardour/themes/clear_gray-livetrax.colors b/gtk2_ardour/themes/clear_gray-livetrax.colors index aeba333bf4..8f4f2e2ac4 100644 --- a/gtk2_ardour/themes/clear_gray-livetrax.colors +++ b/gtk2_ardour/themes/clear_gray-livetrax.colors @@ -318,7 +318,7 @@ - + diff --git a/gtk2_ardour/themes/cubasish-livetrax.colors b/gtk2_ardour/themes/cubasish-livetrax.colors index 8818f4e6ba..bfd6b1d4a1 100644 --- a/gtk2_ardour/themes/cubasish-livetrax.colors +++ b/gtk2_ardour/themes/cubasish-livetrax.colors @@ -318,7 +318,7 @@ - + diff --git a/gtk2_ardour/themes/diehard3-livetrax.colors b/gtk2_ardour/themes/diehard3-livetrax.colors index 459a0ee382..a204f6724b 100644 --- a/gtk2_ardour/themes/diehard3-livetrax.colors +++ b/gtk2_ardour/themes/diehard3-livetrax.colors @@ -319,7 +319,7 @@ - + diff --git a/gtk2_ardour/themes/recbox-livetrax.colors b/gtk2_ardour/themes/recbox-livetrax.colors index f445eb70ed..5c88f7ef64 100644 --- a/gtk2_ardour/themes/recbox-livetrax.colors +++ b/gtk2_ardour/themes/recbox-livetrax.colors @@ -319,7 +319,7 @@ - + diff --git a/gtk2_ardour/themes/unastudia-livetrax.colors b/gtk2_ardour/themes/unastudia-livetrax.colors index a989472786..4e29bdcc71 100644 --- a/gtk2_ardour/themes/unastudia-livetrax.colors +++ b/gtk2_ardour/themes/unastudia-livetrax.colors @@ -317,7 +317,7 @@ - + diff --git a/gtk2_ardour/themes/xcolors-livetrax.colors b/gtk2_ardour/themes/xcolors-livetrax.colors index 5df8e64d6c..696215b47c 100644 --- a/gtk2_ardour/themes/xcolors-livetrax.colors +++ b/gtk2_ardour/themes/xcolors-livetrax.colors @@ -318,7 +318,7 @@ - + diff --git a/gtk2_ardour/trigger_page.cc b/gtk2_ardour/trigger_page.cc index db7ba152de..4857ce89a9 100644 --- a/gtk2_ardour/trigger_page.cc +++ b/gtk2_ardour/trigger_page.cc @@ -730,8 +730,8 @@ TriggerPage::drop_paths_part_two (std::vector paths) } timepos_t pos (0); Editing::ImportDisposition disposition = Editing::ImportSerializeFiles; // or Editing::ImportDistinctFiles // TODO use drop modifier? config? - PublicEditor::instance().do_import (midi_paths, disposition, Editing::ImportAsTrigger, SrcBest, SMFTrackNumber, SMFTempoIgnore, pos, _trigger_clip_picker.instrument_plugin ()); - PublicEditor::instance().do_import (audio_paths, disposition, Editing::ImportAsTrigger, SrcBest, SMFTrackNumber, SMFTempoIgnore, pos); + PublicEditor::instance().do_import (midi_paths, disposition, Editing::ImportAsTrigger, SrcBest, SMFFileAndTrackName, SMFTempoIgnore, pos, _trigger_clip_picker.instrument_plugin ()); + PublicEditor::instance().do_import (audio_paths, disposition, Editing::ImportAsTrigger, SrcBest, SMFFileAndTrackName, SMFTempoIgnore, pos); } bool diff --git a/libs/ardour/io_tasklist.cc b/libs/ardour/io_tasklist.cc index faa0b02cca..69582be615 100644 --- a/libs/ardour/io_tasklist.cc +++ b/libs/ardour/io_tasklist.cc @@ -76,7 +76,7 @@ IOTaskList::IOTaskList (uint32_t n_threads) _workers.resize (_n_threads); for (uint32_t i = 0; i < _n_threads; ++i) { - if (!use_rt || pbd_realtime_pthread_create (policy, THREAD_IO, 0, &_workers[i], &_worker_thread, this)) { + if (!use_rt || pbd_realtime_pthread_create ("I/O", policy, PBD_RT_PRI_IOFX, 0, &_workers[i], &_worker_thread, this)) { if (use_rt && i == 0) { PBD::warning << _("IOTaskList: cannot acquire realtime permissions.") << endmsg; } diff --git a/libs/ardour/session_transport.cc b/libs/ardour/session_transport.cc index 39b76d45f8..db6b920967 100644 --- a/libs/ardour/session_transport.cc +++ b/libs/ardour/session_transport.cc @@ -73,18 +73,7 @@ using namespace ARDOUR; using namespace PBD; using namespace Temporal; -#ifdef NDEBUG -# define ENSURE_PROCESS_THREAD do {} while (0) -#else -# define ENSURE_PROCESS_THREAD \ - do { \ - if (!AudioEngine::instance()->in_process_thread() \ - && !loading ()) { \ - PBD::stacktrace (std::cerr, 30); \ - } \ - } while (0) -#endif - +#define ENSURE_PROCESS_THREAD do {} while (0) #define TFSM_EVENT(evtype) { _transport_fsm->enqueue (new TransportFSM::Event (evtype)); } #define TFSM_ROLL() { _transport_fsm->enqueue (new TransportFSM::Event (TransportFSM::StartTransport)); } diff --git a/libs/ardour/triggerbox.cc b/libs/ardour/triggerbox.cc index 63af2fe41e..97bea7862e 100644 --- a/libs/ardour/triggerbox.cc +++ b/libs/ardour/triggerbox.cc @@ -3650,7 +3650,7 @@ TriggerBox::set_from_path (uint32_t slot, std::string const & path) status.replace_existing_source = false; status.split_midi_channels = false; status.import_markers = false; - status.midi_track_name_source = ARDOUR::SMFTrackNumber; + status.midi_track_name_source = ARDOUR::SMFFileAndTrackName; _session.import_files (status); diff --git a/libs/backends/alsa/alsa_audiobackend.cc b/libs/backends/alsa/alsa_audiobackend.cc index 67794bef9d..55432e5857 100644 --- a/libs/backends/alsa/alsa_audiobackend.cc +++ b/libs/backends/alsa/alsa_audiobackend.cc @@ -952,7 +952,7 @@ AlsaAudioBackend::_start (bool for_latency_measurement) _run = true; _port_change_flag.store (0); - if (pbd_realtime_pthread_create (PBD_SCHED_FIFO, PBD_RT_PRI_MAIN, PBD_RT_STACKSIZE_PROC, + if (pbd_realtime_pthread_create ("ALSA Main", PBD_SCHED_FIFO, PBD_RT_PRI_MAIN, PBD_RT_STACKSIZE_PROC, &_main_thread, pthread_process, this)) { if (pbd_pthread_create (PBD_RT_STACKSIZE_PROC, &_main_thread, pthread_process, this)) { PBD::error << _("AlsaAudioBackend: failed to create process thread.") << endmsg; @@ -1152,7 +1152,7 @@ AlsaAudioBackend::create_process_thread (boost::function func) pthread_t thread_id; ThreadData* td = new ThreadData (this, func, PBD_RT_STACKSIZE_PROC); - if (pbd_realtime_pthread_create (PBD_SCHED_FIFO, PBD_RT_PRI_PROC, PBD_RT_STACKSIZE_PROC, &thread_id, alsa_process_thread, td)) { + if (pbd_realtime_pthread_create ("ALSA Proc", PBD_SCHED_FIFO, PBD_RT_PRI_PROC, PBD_RT_STACKSIZE_PROC, &thread_id, alsa_process_thread, td)) { if (pbd_pthread_create (PBD_RT_STACKSIZE_PROC, &thread_id, alsa_process_thread, td)) { PBD::error << _("AudioEngine: cannot create process thread.") << endmsg; return -1; @@ -1666,7 +1666,7 @@ AlsaAudioBackend::set_latency_range (PortEngine::PortHandle port_handle, bool fo { BackendPortPtr port = std::dynamic_pointer_cast (port_handle); if (!valid_port (port)) { - DEBUG_TRACE (PBD::DEBUG::BackendPorts, "AlsaPort::set_latency_range (): invalid port."); + DEBUG_TRACE (PBD::DEBUG::BackendPorts, "AlsaAudioBackend::set_latency_range (): invalid port."); return; } port->set_latency_range (latency_range, for_playback); @@ -1679,7 +1679,7 @@ AlsaAudioBackend::get_latency_range (PortEngine::PortHandle port_handle, bool fo LatencyRange r; if (!valid_port (port)) { - DEBUG_TRACE (PBD::DEBUG::BackendPorts, "AlsaPort::get_latency_range (): invalid port."); + DEBUG_TRACE (PBD::DEBUG::BackendPorts, "AlsaAudioBackend::get_latency_range (): invalid port."); r.min = 0; r.max = 0; return r; diff --git a/libs/backends/alsa/alsa_midi.cc b/libs/backends/alsa/alsa_midi.cc index 272f391682..15d25cc64b 100644 --- a/libs/backends/alsa/alsa_midi.cc +++ b/libs/backends/alsa/alsa_midi.cc @@ -73,7 +73,7 @@ static void * pthread_process (void *arg) int AlsaMidiIO::start () { - if (pbd_realtime_pthread_create (PBD_SCHED_FIFO, PBD_RT_PRI_MIDI, PBD_RT_STACKSIZE_HELP, + if (pbd_realtime_pthread_create ("ALSA MIDI", PBD_SCHED_FIFO, PBD_RT_PRI_MIDI, PBD_RT_STACKSIZE_HELP, &_main_thread, pthread_process, this)) { if (pbd_pthread_create (PBD_RT_STACKSIZE_HELP, &_main_thread, pthread_process, this)) { diff --git a/libs/backends/alsa/alsa_slave.cc b/libs/backends/alsa/alsa_slave.cc index bc8a1bfd15..6f1025e1d9 100644 --- a/libs/backends/alsa/alsa_slave.cc +++ b/libs/backends/alsa/alsa_slave.cc @@ -111,7 +111,7 @@ AlsaAudioSlave::start () } _run = true; - if (pbd_realtime_pthread_create (PBD_SCHED_FIFO, PBD_RT_PRI_MAIN, PBD_RT_STACKSIZE_HELP, + if (pbd_realtime_pthread_create ("ALSA Slave", PBD_SCHED_FIFO, PBD_RT_PRI_MAIN, PBD_RT_STACKSIZE_HELP, &_thread, _process_thread, this)) { if (pbd_pthread_create (PBD_RT_STACKSIZE_HELP, &_thread, _process_thread, this)) { diff --git a/libs/backends/coreaudio/coreaudio_backend.cc b/libs/backends/coreaudio/coreaudio_backend.cc index a81b7d82d6..d939bd97eb 100644 --- a/libs/backends/coreaudio/coreaudio_backend.cc +++ b/libs/backends/coreaudio/coreaudio_backend.cc @@ -829,7 +829,7 @@ CoreAudioBackend::create_process_thread (boost::function func) } #endif - if (pbd_realtime_pthread_create (PBD_SCHED_FIFO, PBD_RT_PRI_PROC, PBD_RT_STACKSIZE_PROC, + if (pbd_realtime_pthread_create ("CoreAudio Proc", PBD_SCHED_FIFO, PBD_RT_PRI_PROC, PBD_RT_STACKSIZE_PROC, &thread_id, coreaudio_process_thread, td)) { if (pbd_pthread_create (PBD_RT_STACKSIZE_PROC, &thread_id, coreaudio_process_thread, td)) { PBD::error << _("AudioEngine: cannot create process thread.") << endmsg; @@ -1158,7 +1158,7 @@ CoreAudioBackend::set_latency_range (PortEngine::PortHandle port_handle, bool fo { std::shared_ptr port = std::dynamic_pointer_cast (port_handle); if (!valid_port (port)) { - DEBUG_TRACE (PBD::DEBUG::BackendPorts, "BackendPort::set_latency_range (): invalid port."); + DEBUG_TRACE (PBD::DEBUG::BackendPorts, "CoreAudioBackend::set_latency_range (): invalid port."); return; } port->set_latency_range (latency_range, for_playback); @@ -1170,7 +1170,7 @@ CoreAudioBackend::get_latency_range (PortEngine::PortHandle port_handle, bool fo std::shared_ptr port = std::dynamic_pointer_cast (port_handle); LatencyRange r; if (!valid_port (port)) { - DEBUG_TRACE (PBD::DEBUG::BackendPorts, "BackendPort::get_latency_range (): invalid port."); + DEBUG_TRACE (PBD::DEBUG::BackendPorts, "CoreAudioBackend::get_latency_range (): invalid port."); r.min = 0; r.max = 0; return r; diff --git a/libs/backends/dummy/dummy_audiobackend.cc b/libs/backends/dummy/dummy_audiobackend.cc index c20403613e..9c6f961e96 100644 --- a/libs/backends/dummy/dummy_audiobackend.cc +++ b/libs/backends/dummy/dummy_audiobackend.cc @@ -431,7 +431,7 @@ DummyAudioBackend::_start (bool /*for_latency_measurement*/) _port_change_flag.store (0); bool ok = _realtime; - if (_realtime && pbd_realtime_pthread_create (PBD_SCHED_FIFO, PBD_RT_PRI_MAIN, PBD_RT_STACKSIZE_PROC, &_main_thread, pthread_process, this)) { + if (_realtime && pbd_realtime_pthread_create ("Dummy Main", PBD_SCHED_FIFO, PBD_RT_PRI_MAIN, PBD_RT_STACKSIZE_PROC, &_main_thread, pthread_process, this)) { PBD::warning << _("DummyAudioBackend: failed to acquire realtime permissions.") << endmsg; ok = false; } @@ -529,7 +529,7 @@ DummyAudioBackend::create_process_thread (boost::function func) pthread_t thread_id; ThreadData* td = new ThreadData (this, func, PBD_RT_STACKSIZE_PROC); - bool ok = _realtime && 0 == pbd_realtime_pthread_create (PBD_SCHED_FIFO, PBD_RT_PRI_PROC, PBD_RT_STACKSIZE_PROC, &thread_id, dummy_process_thread, td); + bool ok = _realtime && 0 == pbd_realtime_pthread_create ("Dummy Proc", PBD_SCHED_FIFO, PBD_RT_PRI_PROC, PBD_RT_STACKSIZE_PROC, &thread_id, dummy_process_thread, td); if (!ok && pbd_pthread_create (PBD_RT_STACKSIZE_PROC, &thread_id, dummy_process_thread, td)) { PBD::error << _("AudioEngine: cannot create process thread.") << endmsg; return -1; @@ -846,7 +846,7 @@ DummyAudioBackend::set_latency_range (PortEngine::PortHandle port_handle, bool f { BackendPortPtr port = std::dynamic_pointer_cast (port_handle); if (!valid_port (port)) { - DEBUG_TRACE (PBD::DEBUG::BackendPorts, "DummyPort::set_latency_range (): invalid port."); + DEBUG_TRACE (PBD::DEBUG::BackendPorts, "DummyAudioBackend::set_latency_range (): invalid port."); return; } port->set_latency_range (latency_range, for_playback); @@ -858,7 +858,7 @@ DummyAudioBackend::get_latency_range (PortEngine::PortHandle port_handle, bool f LatencyRange r; BackendPortPtr port = std::dynamic_pointer_cast (port_handle); if (!valid_port (port)) { - DEBUG_TRACE (PBD::DEBUG::BackendPorts, "DummyPort::get_latency_range (): invalid port."); + DEBUG_TRACE (PBD::DEBUG::BackendPorts, "DummyAudioBackend::get_latency_range (): invalid port."); r.min = 0; r.max = 0; return r; diff --git a/libs/backends/portaudio/portaudio_backend.cc b/libs/backends/portaudio/portaudio_backend.cc index c8268a5045..5bc0a9cace 100644 --- a/libs/backends/portaudio/portaudio_backend.cc +++ b/libs/backends/portaudio/portaudio_backend.cc @@ -775,7 +775,7 @@ PortAudioBackend::process_callback(const float* input, bool PortAudioBackend::start_blocking_process_thread () { - if (pbd_realtime_pthread_create (PBD_SCHED_FIFO, PBD_RT_PRI_MAIN, PBD_RT_STACKSIZE_PROC, + if (pbd_realtime_pthread_create ("PortAudio Main", PBD_SCHED_FIFO, PBD_RT_PRI_MAIN, PBD_RT_STACKSIZE_PROC, &_main_blocking_thread, blocking_thread_func, this)) { if (pbd_pthread_create (PBD_RT_STACKSIZE_PROC, &_main_blocking_thread, blocking_thread_func, this)) @@ -1103,7 +1103,7 @@ PortAudioBackend::create_process_thread (boost::function func) pthread_t thread_id; ThreadData* td = new ThreadData (this, func, PBD_RT_STACKSIZE_PROC); - if (pbd_realtime_pthread_create (PBD_SCHED_FIFO, PBD_RT_PRI_PROC, PBD_RT_STACKSIZE_PROC, + if (pbd_realtime_pthread_create ("PortAudio Proc", PBD_SCHED_FIFO, PBD_RT_PRI_PROC, PBD_RT_STACKSIZE_PROC, &thread_id, portaudio_process_thread, td)) { if (pbd_pthread_create (PBD_RT_STACKSIZE_PROC, &thread_id, portaudio_process_thread, td)) { DEBUG_AUDIO("Cannot create process thread."); @@ -1428,7 +1428,7 @@ PortAudioBackend::set_latency_range (PortEngine::PortHandle port_handle, bool fo { std::shared_ptr port = std::dynamic_pointer_cast(port_handle); if (!valid_port (port)) { - DEBUG_PORTS("BackendPort::set_latency_range (): invalid port.\n"); + DEBUG_PORTS ("PortAudioBackend::set_latency_range (): invalid port.\n"); return; } port->set_latency_range (latency_range, for_playback); @@ -1440,7 +1440,7 @@ PortAudioBackend::get_latency_range (PortEngine::PortHandle port_handle, bool fo std::shared_ptr port = std::dynamic_pointer_cast(port_handle); LatencyRange r; if (!valid_port (port)) { - DEBUG_PORTS("BackendPort::get_latency_range (): invalid port.\n"); + DEBUG_PORTS ("PortAudioBackend::get_latency_range (): invalid port.\n"); r.min = 0; r.max = 0; return r; diff --git a/libs/backends/portaudio/winmmemidi_output_device.cc b/libs/backends/portaudio/winmmemidi_output_device.cc index 316afce614..bd70d7c9d7 100644 --- a/libs/backends/portaudio/winmmemidi_output_device.cc +++ b/libs/backends/portaudio/winmmemidi_output_device.cc @@ -230,7 +230,7 @@ WinMMEMidiOutputDevice::start_midi_output_thread () m_thread_quit = false; // TODO Use native threads - if (pbd_realtime_pthread_create (PBD_SCHED_FIFO, PBD_RT_PRI_MIDI, PBD_RT_STACKSIZE_HELP, + if (pbd_realtime_pthread_create ("WinMME Output", PBD_SCHED_FIFO, PBD_RT_PRI_MIDI, PBD_RT_STACKSIZE_HELP, &m_output_thread_handle, midi_output_thread, this)) { return false; } diff --git a/libs/backends/pulseaudio/pulseaudio_backend.cc b/libs/backends/pulseaudio/pulseaudio_backend.cc index da4a2d0027..e6fd11b399 100644 --- a/libs/backends/pulseaudio/pulseaudio_backend.cc +++ b/libs/backends/pulseaudio/pulseaudio_backend.cc @@ -584,7 +584,7 @@ PulseAudioBackend::_start (bool /*for_latency_measurement*/) _run = true; _port_change_flag.store (0); - if (pbd_realtime_pthread_create (PBD_SCHED_FIFO, PBD_RT_PRI_MAIN, PBD_RT_STACKSIZE_PROC, + if (pbd_realtime_pthread_create ("PulseAudio Main", PBD_SCHED_FIFO, PBD_RT_PRI_MAIN, PBD_RT_STACKSIZE_PROC, &_main_thread, pthread_process, this)) { if (pbd_pthread_create (PBD_RT_STACKSIZE_PROC, &_main_thread, pthread_process, this)) { PBD::error << _("PulseAudioBackend: failed to create process thread.") << endmsg; @@ -703,7 +703,7 @@ PulseAudioBackend::create_process_thread (boost::function func) pthread_t thread_id; ThreadData* td = new ThreadData (this, func, PBD_RT_STACKSIZE_PROC); - if (pbd_realtime_pthread_create (PBD_SCHED_FIFO, PBD_RT_PRI_PROC, PBD_RT_STACKSIZE_PROC, + if (pbd_realtime_pthread_create ("PulseAudio Proc", PBD_SCHED_FIFO, PBD_RT_PRI_PROC, PBD_RT_STACKSIZE_PROC, &thread_id, pulse_process_thread, td)) { if (pbd_pthread_create (PBD_RT_STACKSIZE_PROC, &thread_id, pulse_process_thread, td)) { PBD::error << _("AudioEngine: cannot create process thread.") << endmsg; @@ -895,7 +895,7 @@ PulseAudioBackend::set_latency_range (PortEngine::PortHandle port_handle, bool f { BackendPortPtr port = std::dynamic_pointer_cast (port_handle); if (!valid_port (port)) { - PBD::error << _("PulsePort::set_latency_range (): invalid port.") << endmsg; + PBD::error << _("PulseAudioBackend::set_latency_range (): invalid port.") << endmsg; } port->set_latency_range (latency_range, for_playback); } @@ -907,7 +907,7 @@ PulseAudioBackend::get_latency_range (PortEngine::PortHandle port_handle, bool f LatencyRange r; if (!valid_port (port)) { - PBD::error << _("PulsePort::get_latency_range (): invalid port.") << endmsg; + PBD::error << _("PulseAudioBackend::get_latency_range (): invalid port.") << endmsg; r.min = 0; r.max = 0; return r; diff --git a/libs/fst/vst3-scanner.cc b/libs/fst/vst3-scanner.cc index 34e8faa3a6..017cc3a9c4 100644 --- a/libs/fst/vst3-scanner.cc +++ b/libs/fst/vst3-scanner.cc @@ -23,6 +23,7 @@ #include #ifdef PLATFORM_WINDOWS +#include #include #else #include diff --git a/libs/hidapi/wscript b/libs/hidapi/wscript index 459327ebed..a85dd53058 100644 --- a/libs/hidapi/wscript +++ b/libs/hidapi/wscript @@ -35,6 +35,7 @@ def build(bld): autowaf.ensure_visible_symbols (obj, False) obj.export_includes = ['hidapi'] obj.includes = ['hidapi'] + obj.defines = ['_POSIX_C_SOURCE=200809L'] obj.name = 'hidapi' obj.target = 'hidapi' obj.vnum = HIDAPI_VERSION @@ -51,7 +52,6 @@ def build(bld): obj.source = 'mac/hid.c' obj.framework = [ 'IOKit', 'CoreFoundation' ] else: - # with '-strict' this needs "-std=gnu99" to compile w/o warnings obj.source = 'linux/hid.c' if re.search ("linux", sys.platform) != None: obj.uselib = 'UDEV' diff --git a/libs/pbd/pbd/msvc_pbd.h b/libs/pbd/pbd/msvc_pbd.h index b4ad77363f..ed52b55b0a 100644 --- a/libs/pbd/pbd/msvc_pbd.h +++ b/libs/pbd/pbd/msvc_pbd.h @@ -176,7 +176,7 @@ typedef unsigned int nfds_t; extern "C" { #endif /* __cplusplus */ -LIBPBD_API int __cdecl gettimeofday(struct timeval *__restrict tv, __timezone_ptr_t tz); +LIBPBD_API int __cdecl gettimeofday(struct timeval *__restrict tv, __timezone_ptr_t tz) __THROW; LIBPBD_API ssize_t PBD_APICALLTYPE pread(int handle, void *buf, size_t nbytes, off_t offset); LIBPBD_API ssize_t PBD_APICALLTYPE pwrite(int handle, const void *buf, size_t nbytes, off_t offset); diff --git a/libs/pbd/pbd/pthread_utils.h b/libs/pbd/pbd/pthread_utils.h index 01108861cf..181dcf9ca8 100644 --- a/libs/pbd/pbd/pthread_utils.h +++ b/libs/pbd/pbd/pthread_utils.h @@ -58,6 +58,7 @@ # define PBD_RT_PRI_MIDI pbd_pthread_priority (THREAD_MIDI) # define PBD_RT_PRI_PROC pbd_pthread_priority (THREAD_PROC) # define PBD_RT_PRI_CTRL pbd_pthread_priority (THREAD_CTRL) +# define PBD_RT_PRI_IOFX pbd_pthread_priority (THREAD_IOFX) LIBPBD_API int pthread_create_and_store (std::string name, pthread_t *thread, void * (*start_routine)(void *), void * arg, uint32_t stacklimit = 0x80000 /*512kB*/); LIBPBD_API void pthread_cancel_one (pthread_t thread); @@ -73,7 +74,7 @@ enum PBDThreadClass { THREAD_MIDI, // MIDI I/O threads THREAD_PROC, // realtime worker THREAD_CTRL, // Automation watch, BaseUI - THREAD_IO // non-realtime I/O + THREAD_IOFX // non-realtime I/O and regionFX }; LIBPBD_API int pbd_pthread_priority (PBDThreadClass); @@ -86,6 +87,7 @@ LIBPBD_API int pbd_pthread_create ( LIBPBD_API int pbd_realtime_pthread_create ( + std::string const& debug_name, const int policy, int priority, const size_t stacksize, pthread_t *thread, void *(*start_routine) (void *), diff --git a/libs/pbd/pthread_utils.cc b/libs/pbd/pthread_utils.cc index 88e21d2624..6a72a284ca 100644 --- a/libs/pbd/pthread_utils.cc +++ b/libs/pbd/pthread_utils.cc @@ -348,7 +348,7 @@ pbd_pthread_priority (PBDThreadClass which) case THREAD_CTRL: default: return -14; // THREAD_PRIORITY_HIGHEST (2) - case THREAD_IO: + case THREAD_IOFX: /* https://github.com/mingw-w64/mingw-w64/blob/master/mingw-w64-libraries/winpthreads/src/sched.c */ return -15; // THREAD_PRIORITY_ABOVE_NORMAL (1) } @@ -372,7 +372,7 @@ pbd_pthread_priority (PBDThreadClass which) return base - 2; case THREAD_CTRL: return base - 3; - case THREAD_IO: + case THREAD_IOFX: return base - 10; } #endif @@ -396,6 +396,7 @@ pbd_absolute_rt_priority (int policy, int priority) int pbd_realtime_pthread_create ( + std::string const& debug_name, const int policy, int priority, const size_t stacksize, pthread_t* thread, void* (*start_routine) (void*), @@ -416,7 +417,7 @@ pbd_realtime_pthread_create ( if (stacksize > 0) { pthread_attr_setstacksize (&attr, stacksize + pbd_stack_size ()); } - DEBUG_TRACE (PBD::DEBUG::Threads, string_compose ("Start Realtime Thread policy = %1 priority = %2 stacksize = 0x%3%4\n", policy, parm.sched_priority, std::hex, stacksize)); + DEBUG_TRACE (PBD::DEBUG::Threads, string_compose ("Start RT Thread: '%1' policy = %2 priority = %3 stacksize = 0x%4%5\n", debug_name, policy, parm.sched_priority, std::hex, stacksize)); rv = pthread_create (thread, &attr, start_routine, arg); pthread_attr_destroy (&attr); diff --git a/libs/surfaces/faderport8/faderport8.cc b/libs/surfaces/faderport8/faderport8.cc index 852697f311..e20ad05345 100644 --- a/libs/surfaces/faderport8/faderport8.cc +++ b/libs/surfaces/faderport8/faderport8.cc @@ -117,7 +117,7 @@ FaderPort8::probe (std::string& i, std::string& o) #elif defined FADERPORT2 "PreSonus FP2" #else - "PreSonus FP8" + "PreSonus FP8 Port 1" #endif ; @@ -465,7 +465,7 @@ FaderPort8::connection_handler (std::string name1, std::string name2) string no = ARDOUR::AudioEngine::instance()->make_port_name_non_relative (std::shared_ptr(_output_port)->name()); if (ni == name1 || ni == name2) { - DEBUG_TRACE (DEBUG::FaderPort8, string_compose ("Connection notify %1 and %2\n", name1, name2)); + DEBUG_TRACE (DEBUG::FaderPort8, string_compose ("Connection notify inputs '%1' and '%2'\n", name1, name2)); if (_input_port->connected ()) { if (_connection_state & InputConnected) { return false; @@ -475,7 +475,7 @@ FaderPort8::connection_handler (std::string name1, std::string name2) _connection_state &= ~InputConnected; } } else if (no == name1 || no == name2) { - DEBUG_TRACE (DEBUG::FaderPort8, string_compose ("Connection notify %1 and %2\n", name1, name2)); + DEBUG_TRACE (DEBUG::FaderPort8, string_compose ("Connection notify outputs '%1' and '%2'\n", name1, name2)); if (_output_port->connected ()) { if (_connection_state & OutputConnected) { return false; @@ -486,7 +486,7 @@ FaderPort8::connection_handler (std::string name1, std::string name2) } } else { #ifdef VERBOSE_DEBUG - DEBUG_TRACE (DEBUG::FaderPort8, string_compose ("Connections between %1 and %2 changed, but I ignored it\n", name1, name2)); + DEBUG_TRACE (DEBUG::FaderPort8, string_compose ("Connections between '%1' and '%2' changed, but I ignored it\n", name1, name2)); #endif /* not our ports */ return false; diff --git a/libs/widgets/slider_controller.cc b/libs/widgets/slider_controller.cc index 9adf823d58..4110ff1844 100644 --- a/libs/widgets/slider_controller.cc +++ b/libs/widgets/slider_controller.cc @@ -57,6 +57,8 @@ SliderController::SliderController (Gtk::Adjustment *adj, std::shared_ptrinterface_to_internal(adj->get_page_increment()) - _ctrl->lower ()); } + ctrl_adjusted (); + adj->signal_value_changed().connect (sigc::mem_fun(*this, &SliderController::ctrl_adjusted)); _spin_adj.signal_value_changed().connect (sigc::mem_fun(*this, &SliderController::spin_adjusted)); diff --git a/share/midi_maps/M-Audio_Axiom_49_mkII.map b/share/midi_maps/M-Audio_Axiom_49_mkII.map new file mode 100644 index 0000000000..03b8ba9498 --- /dev/null +++ b/share/midi_maps/M-Audio_Axiom_49_mkII.map @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/share/scripts/duplicate_to_grid.lua b/share/scripts/duplicate_to_grid.lua new file mode 100644 index 0000000000..3139af7490 --- /dev/null +++ b/share/scripts/duplicate_to_grid.lua @@ -0,0 +1,37 @@ +ardour { + ["type"] = "EditorAction", + name = "Duplicate to grid", + version = "0.1.0", + license = "MIT", + author = "Daniel Appelt", + description = [[Duplicate region to grid]] +} + +function factory () return function () + -- Get first selected region + local regionList = Editor:get_selection().regions:regionlist() + local region = regionList:front() + + -- Bail out if no region was selected + if region:isnil() then + LuaDialog.Message("Duplicate to grid", "Please select a region first!", + LuaDialog.MessageType.Info, LuaDialog.ButtonType.Close):run() + return + end + + -- Create duplicate of region + local playlist = region:playlist() + local curPos = region:position() + local curBeat = Editor:get_grid_type_as_beats(true, curPos) + local nextPos = Temporal.timepos_t.from_ticks(curPos:ticks() + curBeat:to_ticks()) + -- gap could be used to create mulitple duplicates at once + local gap = Temporal.timecnt_t.from_ticks(curBeat:to_ticks()) + playlist:duplicate(region, nextPos, gap, 1) + + -- Change selection to duplicate to allow repeated application + local selectionList = ArdourUI.SelectionList() + region = playlist:find_next_region(curPos, ARDOUR.RegionPoint.Start, 1) + local regionView = Editor:regionview_from_region(region) + selectionList:push_back(regionView) + Editor:set_selection(selectionList, ArdourUI.SelectionOp.Set) +end end diff --git a/share/scripts/s_import_files.lua b/share/scripts/s_import_files.lua index 2a2ce4f797..a402ea0809 100644 --- a/share/scripts/s_import_files.lua +++ b/share/scripts/s_import_files.lua @@ -8,7 +8,7 @@ function factory (params) return function () local pos = Temporal.timepos_t(0) Editor:do_import (files, Editing.ImportDistinctFiles, Editing.ImportAsTrack, ARDOUR.SrcQuality.SrcBest, - ARDOUR.MidiTrackNameSource.SMFTrackName, ARDOUR.MidiTempoMapDisposition.SMFTempoIgnore, + ARDOUR.MidiTrackNameSource.SMFFileAndTrackName, ARDOUR.MidiTempoMapDisposition.SMFTempoIgnore, pos, ARDOUR.PluginInfo(), ARDOUR.Track(), false) end end diff --git a/tools/linux_packaging/build b/tools/linux_packaging/build index 6f9f43d325..c57ee47307 100755 --- a/tools/linux_packaging/build +++ b/tools/linux_packaging/build @@ -76,6 +76,7 @@ while [ $# -gt 0 ] ; do STRIP=all ; WITH_NLS=1 ; APPNAME=LiveTrax ; + EXENAME=LiveTrax ; shift ;; --vbm) VBM=1 diff --git a/wscript b/wscript index 451f0c953d..4febaadf61 100644 --- a/wscript +++ b/wscript @@ -195,6 +195,48 @@ def fetch_tarball_revision_date(): return rev, date +def parse_macos_version(version): + # The [.] matches to the dot after the major version, "." would match any character + if re.search ("^[0-7][.]", version) is not None: + return 'panther' + elif re.search ("^8[.]", version) is not None: + return 'tiger' + elif re.search ("^9[.]", version) is not None: + return 'leopard' + elif re.search ("^10[.]", version) is not None: + return 'snowleopard' + elif re.search ("^11[.]", version) is not None: + return 'lion' + elif re.search ("^12[.]", version) is not None: + return 'mountainlion' + elif re.search ("^13[.]", version) is not None: + return 'mavericks' + elif re.search ("^14[.]", version) is not None: + return 'yosemite' + elif re.search ("^15[.]", version) is not None: + return 'el_capitan' + elif re.search ("^16[.]", version) is not None: + return 'sierra' + elif re.search ("^17[.]", version) is not None: + return 'high_sierra' + elif re.search ("^18[.]", version) is not None: + return 'mojave' + elif re.search ("^19[.]", version) is not None: + return 'catalina' + elif re.search ("^20[.]", version) is not None: + return 'bigsur' + elif re.search ("^21[.]", version) is not None: + return 'monterey' + elif re.search ("^22[.]", version) is not None: + return 'ventura' + elif re.search ("^23[.]", version) is not None: + return 'sonoma' + elif re.search ("^24[.]", version) is not None: + return 'sequoia' + else: + return 'sequoia' + + def set_version (from_file = False): def sanitize(s): # round-trip to remove anything in the string that is not encodable in @@ -458,75 +500,12 @@ int main() { return 0; }''', # OSX if platform == 'darwin': - if re.search ("^13[.]", version) is not None: - conf.env['build_host'] = 'mavericks' - elif re.search ("^14[.]", version) is not None: - conf.env['build_host'] = 'yosemite' - elif re.search ("^15[.]", version) is not None: - conf.env['build_host'] = 'el_capitan' - elif re.search ("^16[.]", version) is not None: - conf.env['build_host'] = 'sierra' - elif re.search ("^17[.]", version) is not None: - conf.env['build_host'] = 'high_sierra' - elif re.search ("^18[.]", version) is not None: - conf.env['build_host'] = 'mojave' - elif re.search ("^19[.]", version) is not None: - conf.env['build_host'] = 'catalina' - elif re.search ("^20[.]", version) is not None: - conf.env['build_host'] = 'bigsur' - elif re.search ("^21[.]", version) is not None: - conf.env['build_host'] = 'monterey' - elif re.search ("^22[.]", version) is not None: - conf.env['build_host'] = 'ventura' - elif re.search ("^23[.]", version) is not None: - conf.env['build_host'] = 'sonoma' - elif re.search ("^24[.]", version) is not None: - conf.env['build_host'] = 'sequoia' - else: - conf.env['build_host'] = 'irrelevant' + conf.env['build_host'] = parse_macos_version (version) # Autodetect if opt.dist_target == 'auto': if platform == 'darwin': - # The [.] matches to the dot after the major version, "." would match any character - if re.search ("^[0-7][.]", version) is not None: - conf.env['build_target'] = 'panther' - elif re.search ("^8[.]", version) is not None: - conf.env['build_target'] = 'tiger' - elif re.search ("^9[.]", version) is not None: - conf.env['build_target'] = 'leopard' - elif re.search ("^10[.]", version) is not None: - conf.env['build_target'] = 'snowleopard' - elif re.search ("^11[.]", version) is not None: - conf.env['build_target'] = 'lion' - elif re.search ("^12[.]", version) is not None: - conf.env['build_target'] = 'mountainlion' - elif re.search ("^13[.]", version) is not None: - conf.env['build_target'] = 'mavericks' - elif re.search ("^14[.]", version) is not None: - conf.env['build_target'] = 'yosemite' - elif re.search ("^15[.]", version) is not None: - conf.env['build_target'] = 'el_capitan' - elif re.search ("^16[.]", version) is not None: - conf.env['build_target'] = 'sierra' - elif re.search ("^17[.]", version) is not None: - conf.env['build_target'] = 'high_sierra' - elif re.search ("^18[.]", version) is not None: - conf.env['build_target'] = 'mojave' - elif re.search ("^19[.]", version) is not None: - conf.env['build_target'] = 'catalina' - elif re.search ("^20[.]", version) is not None: - conf.env['build_target'] = 'bigsur' - elif re.search ("^21[.]", version) is not None: - conf.env['build_target'] = 'monterey' - elif re.search ("^22[.]", version) is not None: - conf.env['build_target'] = 'ventura' - elif re.search ("^23[.]", version) is not None: - conf.env['build_target'] = 'sonoma' - elif re.search ("^24[.]", version) is not None: - conf.env['build_target'] = 'sequoia' - else: - conf.env['build_target'] = 'catalina' + conf.env['build_target'] = parse_macos_version (version) else: match = re.search( "(?Pi[0-6]86|x86_64|powerpc|ppc|ppc64|arm|s390x?)", @@ -736,9 +715,9 @@ int main() { return 0; }''', elif conf.env['build_target'] in ['bigsur'] and not opt.arm64: compiler_flags.extend( - ("-DMAC_OS_X_VERSION_MAX_ALLOWED=101100", - "-mmacosx-version-min=10.11")) - linker_flags.append("-mmacosx-version-min=10.11") + ("-DMAC_OS_X_VERSION_MAX_ALLOWED=101300", + "-mmacosx-version-min=10.13")) + linker_flags.append("-mmacosx-version-min=10.13") elif conf.env['build_target'] in ['bigsur', 'monterey', 'ventura', 'sonoma', 'sequoia']: compiler_flags.extend(