summaryrefslogtreecommitdiff
path: root/libs/ardour
AgeCommit message (Collapse)Author
2020-04-03Allow to disable input auto-connect when creating tracksRobin Gareus
Auto-connect is handled in a background thread, so newly created tracks are not immediately connected. This causes a race-condition when fan-out directly disconnects and re-connects ports after track/bus creation.
2020-04-03NO-OP: indent & whitespaceRobin Gareus
2020-04-03Add missing includeRobin Gareus
2020-04-03Consistent processor labels "Meter"Robin Gareus
Track name is implicit, so instead of "meter-<name>", showing a translatable label "Meter" is sufficient and consistent with "Fader". Under the hood, for introspection, the processor name remains as is.
2020-04-032 x new backend/port classes need to be exportableJohn Emmas
2020-04-03Add/remove source(s) in our MSVC project (libardour)John Emmas
2020-04-02use _instance_name in all messages from PortEngineSharedImplPaul Davis
2020-04-02use PortEngineSharedImpl with DummyAudioBackendPaul Davis
2020-04-02add new file to wscriptPaul Davis
2020-04-02refactor shared PortEngine implementation from AlsaAudioBackendPaul Davis
2020-04-03Allow to query current effective instrument model/modeRobin Gareus
This exposes custom plugin model/mode. It can be useful for the GUI to detect if effective settings have changed, and context-menus have to be re-build.
2020-04-02Revert "move the point of adding a new MIDI track until *after* the ↵Robin Gareus
instrument is added" This reverts commit fac8d84786f420f91b68ce2e444579ea2162cb8d. This fixes fan-out. The track should be created before any tracks or busses are created that are fed by the MIDI track. The apparent motivation for fac8d847 was MIDNAM related (there was code in the GUI that needed the instrument, which was called from within ::add_routes). This should no longer be the case, the GUI needs to pick up instrument changes after track creation via processors changed; besides MIDI busses were still created before the instrument.
2020-04-02Update fan-out signalRobin Gareus
* Signals use camelcase. * use a static signal, independent of the route Previously the signal was handled by RouteUI, which caused various issues: * the RouteUI may not yet be available * There may be many RouteUIs for a single Route (mixer, editor-mixer, meter-bridge strips)
2020-04-02Emit Locate() in ::locate() even if we are not synced_to_engine()Johannes Mueller
This reverts 05c77db7739c (revert necessary due to 4637c49838a8) Since 4637c49838a8 we no longer emit Located() in ::backend_sync_callback(). Therefore we must emit Located() in ::locate() even if we are synced_to_engine(). Otherwise the playhead is not updated when synced_to_engine() in some circumstances.
2020-04-02Re-save templates if they have been loaded from an older version of ArdourJohannes Mueller
2020-04-02Don't issue VersionMismatch when creating a new sessionJohannes Mueller
When we create a new session and are using a template from an old version of Ardour, we should not issue the VersionMismatch dialog and not make a copy of the session file for the old version. We need to extend the signature of Session::load_state() to tell it if we are creating a session from a template. Session::_is_new cannot be used for it because it has a the semantics if to auto connect the the master bus.
2020-04-02Restart Transport FSM after x-run halt #7951Robin Gareus
2020-04-01Add API to count named MIDNAM controlsRobin Gareus
2020-04-01Cache instrument plugin MIDNAM model & modeRobin Gareus
2020-04-01add method to check for xrun status of a markerPaul Davis
2020-04-01Overhaul InstrumentInfoRobin Gareus
* Remove unused direct calls into plugin * Assume empty model to mean plugin-provided MIDNAM (!) The route owned Instrument-Info is the central access point used by the GUI for MIDI name lookups. At this point in time, custom settings are saved/restored by the GUI (MidiTimeAxisView). InstrumentInfo provides a volatile store for MIDNAM mode and model.
2020-04-01fix boolean logic PART FOUR when trying to avoid complete_refill heuristicPaul Davis
This reworking avoids some confusion caused by the use boost::optional here
2020-03-31fix boolean logic PART THREE when trying to avoid complete_refill heuristicPaul Davis
2020-03-31fix boolean logic PART TWO when trying to avoid complete_refill heuristicPaul Davis
2020-03-31fix boolean logic when trying to avoid complete_refill heuristicPaul Davis
2020-03-31change variable name and debug messages for underrun case (information was ↵Paul Davis
misleading/confusing)
2020-03-31clean up logic for declick out in DiskReaderPaul Davis
This is intended to be a no-op that makes the code easier to read/reason about
2020-03-31if a locate brings us within a heuristic-specified distance of the current ↵Paul Davis
position in a DiskReader, pay attention to loop status If the last read was not looped, but the new one should be, we need to ignore the heuristic. Ditto for vice-versa. This isomorphic with the read-reversed case
2020-03-31Postpone disk-i/o setup during session-loadRobin Gareus
This fixes another assert(), caused by configuring processors, before set_processor_state() was called. Route::configure_processors() will be called later. --- #3 0x00007ffff2472102 in __GI___assert_fail at assert.c:101 #4 0x00007ffff7a8ca1f in ARDOUR::Route::setup_invisible_processors() at ../libs/ardour/route.cc:5013 #5 0x00007ffff7a7a665 in ARDOUR::Route::configure_processors_unlocked at ../libs/ardour/route.cc:1870 #6 0x00007ffff7a79377 in ARDOUR::Route::configure_processors at ../libs/ardour/route.cc:1719 #7 0x00007ffff7a902c0 in ARDOUR::Route::set_disk_io_point at ../libs/ardour/route.cc:6041 #8 0x00007ffff7a7ea0a in ARDOUR::Route::set_state at ../libs/ardour/route.cc:2679
2020-03-30Always delegate meter-point positioning to rt-threadRobin Gareus
Previously set_state() -> set_meter_point() acquired the process-lock to change meter-position, usually causing x-runs when setting route-state. This also fixes an issue introduced in fd414ec158. After populating the processor list, force setting the meter-position looks up the output streams of the processor before the meter. However the processors are not configured. That will only happen later from Session::post_engine_init(). --- #3 0x00007ff07b7d4102 in __GI___assert_fail at assert.c:101 #4 0x00007ff080d3224a in ARDOUR::PluginInsert::output_streams() const at ../libs/ardour/plugin_insert.cc:289 #5 0x00007ff080de8c30 in ARDOUR::Route::set_meter_point_unlocked() at ../libs/ardour/route.cc:4106 #6 0x00007ff080de8699 in ARDOUR::Route::set_meter_point(ARDOUR::MeterPoint, bool) at ../libs/ardour/route.cc:4037 #7 0x00007ff080ddfad3 in ARDOUR::Route::set_state(XMLNode const&, int) at ../libs/ardour/route.cc:269
2020-03-30Add API to reset DSP load stateRobin Gareus
2020-03-30Assert that plugins are configured before setting custom meter positionRobin Gareus
This fixes the following issue: On the master channel insert the waveform scope before the fader. Then set the meter position to custom and move the meter to the very beginning of the chain. Before this change, when set_meter_point() was called the processor list only contained the Fader (_amp) and no other processor. _main_outs was not yet present in the list, and Route::maybe_note_meter_position() triggered an and assert(_processor_after_last_custom_meter.lock()); See also d0dca7daf0
2020-03-30Tweak engine startup, initial silenceRobin Gareus
This can help when running with very low latency and the initial process callback is [indirectly] expensive. E.g. load a heavy session the a RPi4, initial setup can pull in a lot of data, which blocks the bus. In particular with the ALSA backend this can lead to poll timeout which effectively stops the backend.
2020-03-29Fix optimized build crashes (missing return value) - #7958Robin Gareus
2020-03-29Set thread-names (libs)Robin Gareus
2020-03-29Engine: Silence outputs for 1/2 second when loading a sessionRobin Gareus
This allows for caches to warm up, background worker threads to spin up and things settle down. This also prevents initial audible artifacts of live input. In almost all cases this completes before the GUI is brought up.
2020-03-28remove noisy and unhelpful log messagePaul Davis
2020-03-28prevent CD markers from being placed at or before session start (#7942)Paul Davis
2020-03-28Don't use shared-pointers in cross thread event structsRobin Gareus
This fixes a deadlock when closing the session. Session::destroy() takes the engine-lock while removing unhandled session-events. In [1], the event-queue held a last reference to a Track, and releasing that object triggered events (here ~IO) that required the lock. --- [1] #2 0x0041743a in Glib::Threads::Mutex::Lock::Lock at /home/ardour/linux-armhf/stack/include/glibmm-2.4/glibmm/threads.h:643 #3 0xb67433ba in ARDOUR::IO::~IO at ../libs/ardour/io.cc:105 #4 0xb6743612 in ARDOUR::IO::~IO at ../libs/ardour/io.cc:111 #5 0xb6758e66 in boost::checked_delete<ARDOUR::IO> at /home/ardour/linux-armhf/stack/include/boost/core/checked_delete.hpp:34 #6 0xb675912c in boost::detail::sp_counted_impl_p<ARDOUR::IO>::dispose at /home/ardour/linux-armhf/stack/include/boost/smart_ptr/detail/sp_counted_impl.hpp:92 #7 0x004178d8 in boost::detail::sp_counted_base::release at /home/ardour/linux-armhf/stack/include/boost/smart_ptr/detail/sp_counted_base_sync.hpp:129 #8 0x00417986 in boost::detail::shared_count::~shared_count at /home/ardour/linux-armhf/stack/include/boost/smart_ptr/detail/shared_count.hpp:426 #9 0xb662343a in boost::shared_ptr<ARDOUR::IO>::~shared_ptr at /home/ardour/linux-armhf/stack/include/boost/smart_ptr/shared_ptr.hpp:341 #10 0xb6a4af7a in ARDOUR::Route::~Route at ../libs/ardour/route.cc:282 #11 0xb6b9404c in ARDOUR::Track::~Track at ../libs/ardour/track.cc:71 #12 0xb697164a in ARDOUR::MidiTrack::~MidiTrack at ../libs/ardour/midi_track.cc:94 #13 0xb697177a in ARDOUR::MidiTrack::~MidiTrack at ../libs/ardour/midi_track.cc:96 #14 0xb6ac525a in boost::checked_delete<ARDOUR::MidiTrack> at /home/ardour/linux-armhf/stack/include/boost/core/checked_delete.hpp:34 #15 0xb6acde00 in boost::detail::sp_counted_impl_p<ARDOUR::MidiTrack>::dispose at /home/ardour/linux-armhf/stack/include/boost/smart_ptr/detail/sp_counted_impl.hpp:92 #16 0x004178d8 in boost::detail::sp_counted_base::release at /home/ardour/linux-armhf/stack/include/boost/smart_ptr/detail/sp_counted_base_sync.hpp:129 #17 0x00417986 in boost::detail::shared_count::~shared_count at /home/ardour/linux-armhf/stack/include/boost/smart_ptr/detail/shared_count.hpp:426 #18 0xb664dca6 in boost::shared_ptr<ARDOUR::Track>::~shared_ptr at /home/ardour/linux-armhf/stack/include/boost/smart_ptr/shared_ptr.hpp:341 #19 0xb6aaf67e in ARDOUR::SessionEvent::~SessionEvent at ../libs/ardour/ardour/session_event.h:42 #20 0xb6a91a88 in ARDOUR::Session::destroy at ../libs/ardour/session.cc:753 #21 0xb6a8fb20 in ARDOUR::Session::~Session at ../libs/ardour/session.cc:460 #22 0xb6a9075e in ARDOUR::Session::~Session at ../libs/ardour/session.cc:46
2020-03-28Add Lua bindings to check engine statusRobin Gareus
2020-03-28Create write sources for template/dup tracks - #7940Robin Gareus
This fixes a crash with missing [MIDI] write-sources after duplicating tracks [1]: Stealing write-source name fails, because there is no write-source. When duplicating tracks, reset_write_sources() is called before any playlists are set [2]. So no new write-sources are created because _playlists[DATA-TYPE] is empty. During normal track creation write-sources are usually added by the input-change handler [3]. However in this case the state has been set, and since there is no change, DiskWriter::configure_io does not call use_new_write_source() NB. This also re-creates write-source when playlists are changed. -=- [1] #3 0x00007f4420690102 in __GI___assert_fail at assert.c:101 #4 0x0000562bfa300dc9 in boost::shared_ptr<ARDOUR::SMFSource>::operator->() const at /usr/include/boost/smart_ptr/shared_ptr.hpp:734 #5 0x00007f442579ffa1 in ARDOUR::DiskWriter::steal_write_source_name[abi:cxx11]() at ../libs/ardour/disk_writer.cc:1290 #6 0x00007f4425e476b6 in ARDOUR::Track::steal_write_source_name[abi:cxx11]() at ../libs/ardour/track.cc:476 #7 0x00007f4425d060a2 in ARDOUR::Session::create_midi_source_by_stealing_name at ../libs/ardour/session.cc:4955 #8 0x0000562bf9ed39ab in MidiTimeAxisView::add_region at ../gtk2_ardour/midi_time_axis.cc:1650 #9 0x0000562bf9b05f2a in Drag::add_midi_region at ../gtk2_ardour/editor_drag.cc:568 -=- [2] #0 0x00007ffff7582e2f in ARDOUR::DiskWriter::reset_write_sources at ../libs/ardour/disk_writer.cc:946 #1 0x00007ffff757fce6 in ARDOUR::DiskWriter::set_state at ../libs/ardour/disk_writer.cc:333 #2 0x00007ffff7a81c93 in ARDOUR::Route::set_processor_state at ../libs/ardour/route.cc:3054 #3 0x00007ffff7a7f5d5 in ARDOUR::Route::set_state at ../libs/ardour/route.cc:2697 #4 0x00007ffff7c2aa1d in ARDOUR::Track::set_state at ../libs/ardour/track.cc:172 #5 0x00007ffff794f204 in ARDOUR::MidiTrack::set_state at ../libs/ardour/midi_track.cc:152 #6 0x00007ffff7b7e06b in ARDOUR::Session::XMLRouteFactory at ../libs/ardour/session_state.cc:1890 #7 0x00007ffff7addf7e in ARDOUR::Session::new_route_from_template at ../libs/ardour/session.cc:3048 #8 0x000055555621329a in DuplicateRouteDialog::on_response(int) at ../gtk2_ardour/duplicate_routes_dialog.cc:194 -=- [3] #0 0x00007ffff7583243 in ARDOUR::DiskWriter::use_new_write_source at ../libs/ardour/disk_writer.cc:996 #1 0x00007ffff75831c7 in ARDOUR::DiskWriter::reset_write_sources at ../libs/ardour/disk_writer.cc:989 #2 0x00007ffff75851ea in ARDOUR::DiskWriter::configure_io at ../libs/ardour/disk_writer.cc:1335 #3 0x00007ffff7a7b308 in ARDOUR::Route::configure_processors_unlocked at ../libs/ardour/route.cc:1912 #4 0x00007ffff7a79e4b in ARDOUR::Route::configure_processors at ../libs/ardour/route.cc:1719 #5 0x00007ffff7a86695 in ARDOUR::Route::input_change_handler at ../libs/ardour/route.cc:3632
2020-03-28NO-OP: whitespaceRobin Gareus
2020-03-28Minor code cleanup - consolidate variables & scopeRobin Gareus
2020-03-28Fix incorrect timestretch duration - #7943Robin Gareus
Completing readout available() returns 0, until all background threads have finished and joined. This also improves performance by feeding suggested/required amount of samples on every process() call.
2020-03-27make MIDI tracing work again for ports that are handled using ↵Paul Davis
::read_and_parse_entire_midi_buffer_with_no_speed_adjustment()
2020-03-27variable rename and commentPaul Davis
2020-03-27fix user-driven varispeedPaul Davis
2020-03-26Display unit-label of VST parameters -- #7938Robin Gareus
2020-03-26Fix compiler warningRobin Gareus
2020-03-25Convert polarity invert state from v2 sessionsRobin Gareus