summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-03-10Add Lua bindings to access region-fadesRobin Gareus
2020-03-10Fix optimized mingw/gcc-8.2 buildsRobin Gareus
gcc-8.2 -O3 optimization enables -finline-functions. For reasons yet unknown this causes issues with Glib::Threads::Private when loading sessions (creating new ones is fine) and likely some other operations. Without this change the following happens (5.12 as well as current git) when loading an existing session: --- [Switching to Thread 6092.0x12fc] Breakpoint 1, ARDOUR::SessionEvent::create_per_thread_pool (name=..., nitems=4096) at ../libs/ardour/session_events.cc:60 60 in ../libs/ardour/session_events.cc $6 = (const std::__cxx11::string &) @0x210dfc60: {static npos = 18446744073709551615, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x210dfc70 "GUI"}, _M_string_length = 3, {_M_local_buf = "GUI\000\000\000\000\000<E0>P<DA>:\000\000\000", _M_allocated_capacity = 4805959}} #0 ARDOUR::SessionEvent::create_per_thread_pool (name=..., nitems=4096) at ../libs/ardour/session_events.cc:60 #1 0x0000000000434e77 in ?? () [..] Thread 1 (Thread 6092.0x12fc): #0 0x0000000061f152ef in PBD::RingBuffer<void*>::write (this=this@entry=0x50, src=src@entry=0x210dcdc8, cnt=cnt@entry=1) at ../libs/pbd/pbd/ringbuffer.h:170 #1 0x0000000061ee954d in push (t=<optimized out>, this=0x0) at ../libs/pbd/pool.cc:290 #2 CrossThreadPool::flush_pending_with_ev (this=0x0, ptr=<optimized out>) at ../libs/pbd/pool.cc:254 #3 0x00000000218d5b01 in operator() (a0=0x210dcdc8, this=0x48) at /home/ardour/win-stack-w64/include/boost/function/function_template.hpp:682 #4 operator()<boost::function<void(ARDOUR::SessionEvent*)>, boost::_bi::list0> (a=<synthetic pointer>, f=..., this=0x68) at /home/ardour/win-stack-w64/include/boost/bind/bind.hpp:259 #5 operator() (this=0x48) at /home/ardour/win-stack-w64/include/boost/bind/bind.hpp:1294 #6 boost::detail::function::void_function_obj_invoker0<boost::_bi::bind_t<boost::_bi::unspecified, boost::function<void (ARDOUR::SessionEvent*)>, boost::_bi::list1<boost::_bi::value<ARDOUR::SessionEvent*> > >, void>::invoke(boost::detail::function::function_buffer&) (function_obj_ptr=...) at /home/ardour/win-stack-w64/include/boost/function/function_template.hpp:159 #7 0x0000000063e2dc39 in operator() (this=0x210dcf70) at /home/ardour/win-stack-w64/include/boost/function/function_template.hpp:682 #8 AbstractUI<Gtkmm2ext::UIRequest>::call_slot(PBD::EventLoop::InvalidationRecord*, boost::function<void ()> const&) (this=0x3ada50e0, invalidation=0x0, f=...) at ../libs/pbd/pbd/abstract_ui.cc:434 #9 0x00000000216cbb96 in ARDOUR::SessionEventManager::merge_event (this=<optimized out>, ev=<optimized out>) at /home/ardour/win-stack-w64/include/boost/function/function_template.hpp:507 #10 0x00000000216e3861 in non-virtual thunk to ARDOUR::Session::queue_event(ARDOUR::SessionEvent*) () at ../../win-stack-w64/include/glibmm-2.4/glibmm/threads.h:709 #11 0x00000000216c91bf in ARDOUR::SessionEventManager::clear_events(ARDOUR::SessionEvent::Type, boost::function<void ()>) (this=this@entry=0x4256cc08, type=type@entry=ARDOUR::SessionEvent::Skip, after=...) at ../libs/ardour/session_events.cc:156 #12 0x000000002168874a in ARDOUR::Session::sync_locations_to_skips (this=this@entry=0x4256ca90) at /usr/lib/gcc/x86_64-w64-mingw32/8.3-posix/include/c++/new:169 #13 0x0000000021688802 in ARDOUR::Session::update_skips (this=this@entry=0x4256ca90, loc=loc@entry=0x0, consolidate=consolidate@entry=false) at ../libs/ardour/session.cc:1683 #14 0x0000000021699649 in _locations_changed (locations=..., this=0x4256ca90) at ../libs/ardour/session.cc:1859 #15 apply<ARDOUR::Session> (method= (void (ARDOUR::Session::*)(ARDOUR::Session * const, const ARDOUR::Locations::LocationList &)) 0x216994f0 <ARDOUR::Session::_locations_changed(std::__cxx11::list<ARDOUR::Location*, std::allocator<ARDOUR::Location*> > const&)>, obj=..., this=0x40ff4c60) at ../libs/ardour/ardour/location.h:240 #16 ARDOUR::Session::locations_changed (this=this@entry=0x4256ca90) at ../libs/ardour/session.cc:1840 #17 0x0000000021700abd in ARDOUR::Session::set_state (this=0x4256ca90, node=..., version=6000) at ../libs/ardour/session_state.cc:1657 #18 0x0000000021713456 in ARDOUR::Session::post_engine_init (this=this@entry=0x4256ca90) at ../libs/pbd/pbd/xml++.h:81 #19 0x00000000216ad5cd in ARDOUR::Session::Session (this=0x4256ca90, eng=..., fullpath=..., snapshot_name=..., bus_profile=<optimized out>, mix_template=...) at ../libs/ardour/session.cc:383 #20 0x000000000046db8b in ?? () Backtrace stopped: previous frame inner to this frame (corrupt stack?) --- Note that in the trace starting at #19 the source-file references are offset :post_engine_init() isn't in xml++.h (likely debug symbols are incorrect due to inline functions) The application crashes due to #2 ::flush_pending_with_ev (this=0x0 ..) But the earlier breakpoint above shows that the ThreadPool was created, and this #11 ::clear_events() should not assign NULL. (This happens on a single-core CPU, too)
2020-03-10NO-OP: use set/clear_flag() API instead of set_flags()Robin Gareus
2020-03-10Add convenience ControlFlags operatorsRobin Gareus
Explicit functions for operator&=~ and operator|=
2020-03-10remove debug outputPaul Davis
2020-03-10create transport master in the factory method if the engine is runningPaul Davis
This fixes the GUI thinking there is no port because it is notified about the TM before the port is created
2020-03-10small improvements to Transport Masters dialog (in preferences and elsewhere)Paul Davis
2020-03-10small adjustments to TransportMaster API to better accomodate the ↵Paul Davis
"ignore/accept commands" concept
2020-03-10do not reset default transport speed when stopping to prepare for a locatePaul Davis
2020-03-10Adhere to Ardour style guide - 810b2fb78dNikolaus Gullotta
2020-03-10Avoid using 'boost::aligned_storage' which is known to be problematic in ↵John Emmas
MSVC builds:- https://www.boost.org/doc/libs/1_65_0/libs/type_traits/doc/html/boost_typetraits/reference/aligned_storage.html
2020-03-09Session::have_looped must only be true when we locate because we reached the ↵Paul Davis
loop end Locating the start of the loop range at transport start does not count as "have looped". This was preventing pre-roll when starting to loop, which in turn caused data/event loss because the start/end sample ranges would be incorrect inside process
2020-03-09Revert failed experiment, scripted multiple MIDI outputs via dsp_run()Robin Gareus
This reverts commit 8702ff2189665b473918ed60f34b6be4010a06f7, and b10d9cf09bf6150f0ba0eae5dc34fd8db8b2fa91. There was a misconception on the iterator (port vs message in sequence), besides Ardour's mixer-strip is preferably used with a single MIDI port. Most plugin-standards also only support one port. If need be LuaDSP run_map() can be used to handle multiple MIDI I/O ports already.
2020-03-09Prevent double free of global observersNikolaus Gullotta
We accomplish this by explicitly setting the global_obs to NULL after free'ing it. The crash that led to this fix can be replicated as such $ sendosc localhost 3819 /set_surface i 8 i 159 i 8 $ sendosc localhost 3819 /set_surface i 0 i 0 i 0 $ sendosc localhost 3819 /set_surface i 0 i 0 i 0 In this example the observer is created, then free'd, and then free'd *again* because the new observer was never made (sur->feedback[x] checks fail)
2020-03-09Fix MacOS 10.11 (clang-8.0.0) buildsRobin Gareus
gcc, and recent clang-10 can construct new objects using references as arguments. However clang-8 (and MSVC?) do not: "error: no matching function for call to 'operator new'" The compiler apparently does not expand the template class A <-> `A*` vs. `A const&` for different cases.
2020-03-08Allow to bundle gdb with optimized windows buildsRobin Gareus
Preferably also configure with "--optimize --debug-symbols" when setting the PACKAGE_GDB environment variable
2020-03-08Replace strftime() with Glib::DateTime() -- GUIRobin Gareus
This is mainly for windows compatibility "%F" is not supported. An alternative would be to s/%F/%Y-%m-%d/ to produce the ISO date.
2020-03-08Replace strftime() with Glib::DateTime()Robin Gareus
This is mainly for windows compatibility "%F" is not supported. An alternative would be to s/%F/%Y-%m-%d/ to produce the ISO date.
2020-03-08Fix typo in f265bbbf82e9Robin Gareus
2020-03-08Fix count-in and loop-as-mode metronome clicksRobin Gareus
2020-03-08mingw/gcc-8.2 compat: _xgetbv() needs -mxsaveRobin Gareus
Otherwise this causes PBD::FPU to fail with error: inlining failed in call to always_inline ‘long long int _xgetbv(unsigned int)’
2020-03-08Fix for modern boost + updated buildstackRobin Gareus
Ardour's boost is not compiled --with-system, this causes issues with modern compilers (gcc 8.2) when linking.
2020-03-08NO-OP: whitespaceRobin Gareus
2020-03-07Remove Mixbus send special caseRobin Gareus
Mixbus v6 uses AutomationType BusSendLevel like other Sends, however with different min/max range compared to default Ardour Aux sends. Control surfaces should use interface/internal API.
2020-03-07Fix OSC endless loop for tracks with hidden pluginsRobin Gareus
2020-03-07Iniialize uninitialized variableRobin Gareus
2020-03-06Fix MIDI export and post-export transport issuesRobin Gareus
Bug was introduced in 128a45954cf, declick-amp gain was overridden, but declick not cleared. For some reason this did not affect audio-only exports nor all session exports.
2020-03-06fix startupFSM handling of a ShouldLoad signalPaul Davis
This currently only handles initial session load by dbl-click on a session file. It also does not work if the user or new or subject to a pre-release warning. These last two restrictions may remain in place, although if a person's first exposure to the program is "copy my session, download program, dbl-click on the session file", then that's not so nice
2020-03-06fix apple/clang warningPaul Davis
2020-03-06fix (potentially serious) typo that confused comparison with assignmentPaul Davis
2020-03-06Fix potential deadlock when exporting w/normalizingRobin Gareus
start_post_processing() may be called from the freewheeling callback, when starting to normalize.
2020-03-06RT-safety use stack (not heap) for plugin pin mappingsRobin Gareus
2020-03-06Add a STL Allocator using the stack (for rt safety)Robin Gareus
This is a dumb stack allocator using LIFO allocation/free, with a fallback to new/delete. This works well for small STL containers in particular std::vector, but it's also suitable for std::map<>, in particular copy constructing small POD maps (plugin pin mappings). Eventually this could be combined with TLSF for a flexible memory arena management. This is however not currently needed for any the planned use-cases. This code is ANSI C++98 compatible, and yet also works with modern C++11, C++14
2020-03-06Fix Coreaudio buffersize changesRobin Gareus
2020-03-06Increase accuracy of analyzed true-peak positionsRobin Gareus
2020-03-06Remove debug outputRobin Gareus
2020-03-06Fix realtime export checkbox consistencyRobin Gareus
2020-03-06Remove backend support for region-output exportRobin Gareus
This use-case is better served via stem-export.
2020-03-06Remove region-output export (GUI)Robin Gareus
This use-case is better served via stem-export. This export mode never worked correctly when latent plugins are present on the track. or when realtime export was chosen. This used to call track.export_stuff() -> bounce_process() periodically in small chunks from freewheeling callback, which is no longer functional.
2020-03-06Fix export alignment (#7916)Robin Gareus
Ardour's playback is aligned to master-out: "When the playback clock reads 01:00:00:00, the sample corresponding to 01:00:00:00 is audible at the speaker(s)" When exporting, and grabbing data from output ports, the signal is offset by the master-bus physical playback latency. This was compensated for, but lead to initial silence in the exported file. New approach is to start capturing export data during pre-roll, at the time when playback is written to the output buffers. To also shaves off a common offset to make this work with realtime export. Effectively this emulates processing with disconnected master-output port, while still keeping any latency of effects on the master-bus itself. Last but not least: jack updates latencies when freewheeling, (setting HW latency to zero). The callback arrives asynchronously some time after enabling freewheeling, but after Export Ports have been configured. Those callbacks are ignored.
2020-03-06Fix realtime export of multiple time-spansRobin Gareus
After exporting a time-span, the next time-span was started directly from the rt-callback. This had various issues. In particular with realtime export. Post-processing of a realtime-export enables freewheeling and is driven by freewheel callbacks. Freewheeling needs to be safely disabled for an upcoming realtime export. A similar issues existed when mixing realtime and non-realtime exports.
2020-03-06Do not de-click during freewheel exportRobin Gareus
2020-03-06Separate pre-roll cycle calculationRobin Gareus
This is also needed when exporting.
2020-03-06Remove debug messageRobin Gareus
2020-03-05move more or less all responsibility for ShouldLoad (macOS, NSM) back into ↵Paul Davis
ARDOUR_UI
2020-03-05continue with code simplification and add comment given 4a40ff9e53Paul Davis
2020-03-05transport stop resets default_transport_speedPaul Davis
This means that using the wheel in the GUI (or equivalent) ends its effect at transport stop
2020-03-05Remove a suspected C99-ismJohn Emmas
'lower_bound()' iterates between param #1 and param #2, comparing the result with param #3 - either by making the comparison internally or by deferring to an external comparator function. Prior to C99 however, BOTH cases required param #3 to match the type being iterated. In the case of a deferred comparison, there was apparently a proposal to relax this restriction in C99, though I'm not sure if it in fact got implemented (can't find any examples of it anywhere...)
2020-03-03Fix odd right click crash on master track.Todd Naugle
To reproduce. Launch, right click in ruler area then drag down until over the master track and let go. #0 0x0000555555ba1d44 in boost::shared_ptr<ARDOUR::Route>::get() const (this=0x8) at /usr/include/boost/smart_ptr/shared_ptr.hpp:748 #1 0x0000555555ba0a2f in boost::dynamic_pointer_cast<ARDOUR::Track, ARDOUR::Route>(boost::shared_ptr<ARDOUR::Route> const&) (r=...) at /usr/include/boost/smart_ptr/shared_ptr.hpp:904 #2 0x000055555650b92b in RouteUI::track() const (this=0x0) at ../gtk2_ardour/route_ui.cc:1885 #3 0x0000555555d0b92f in Editor::popup_track_context_menu(int, int, ItemType, bool) (this= 0x555557a3efd0, button=1, time=600214966, item_type=StreamItem, with_selection=false) at ../gtk2_ardour/editor.cc:1595 #4 0x0000555555e1a4cf in Editor::button_release_handler(ArdourCanvas::Item*, _GdkEvent*, ItemType) (this=0x555557a3efd0, item= 0x555557b2fe00, event=0x7fffffffc310, item_type=StreamItem) at ../gtk2_ardour/editor_mouse.cc:1543 ....
2020-03-03Fix off by one in Lua scriptsRobin Gareus
Lua arrays (tables) start counting at one. Also `for i = a, b do .. end` is inclusive: a <= i <= b