Commit Graph

29013 Commits

Author SHA1 Message Date
Robin Gareus
4c29eb5b6a Add missing include for compat (memcpy needs string.h) 2020-02-08 21:27:57 +01:00
Robin Gareus
39975dc3c6 Reduce used namespace
This partially reverts 40cca52b, this code is only
using ARDOUR::Session and nothing else from ARDOUR.
2020-02-07 23:14:48 +01:00
Paul Davis
d5c1ad805d NOOP: add whitespace/blank line 2020-02-07 12:20:11 -07:00
Paul Davis
46277acb40 Fix incorrect assignment of MIDNAM device mode 2020-02-07 12:20:11 -07:00
Paul Davis
e93150cb3f NOOP: remove line wrapping 2020-02-07 12:20:11 -07:00
John Emmas
40cca52bbb Changes needed for building with MSVC
Mostly these are to do with TLSF which I hadn't in fact been building!! Hopefully there won't be any problems for the gcc builds.
2020-02-07 11:27:22 +00:00
Paul Davis
8242478da5 try to fix awful confusion and misbehavior for plugin-provided MIDNAM situations
We do not store the MIDNAM model as a GUIObject property if the using the plugin-provided MIDNAM. Selecting a different MIDNAM for
the plugin should now result in that choice being saved/restored correctly.

This all feels crazily complicated, but I don't want to change more of the architecture at this time
2020-02-06 14:43:58 -07:00
Paul Davis
55d158816e NOOP: avoid unnecessary and distracting line wrapping 2020-02-06 14:43:58 -07:00
Paul Davis
d4dd756bf6 always use plugin's ::midnam_model() method to provide the name of a custom, plugin provided MIDNAM document 2020-02-06 14:43:58 -07:00
Paul Davis
39e0c0a084 add AxisView::remove_gui_property() 2020-02-06 14:43:58 -07:00
Paul Davis
c791d5970f add GUIObjectState::remove_property() 2020-02-06 14:43:58 -07:00
Nikolaus Gullotta
a13fabf344 Resize session dialog back to initial height and width on "back"
This fixes an issue where the size of the window stayed much larger
than its content if there are no sessions in the session search path
after attempting to make a new session and then pressing "back"
2020-02-06 14:45:09 -06:00
Robin Gareus
5fb38c7c53 Fix DSP::process_map edge-case (unconnected inputs)
previously this could result in signals being passed though
(in-place) when inputs were disconnected.
2020-02-06 21:40:02 +01:00
Robin Gareus
f2980e5f05 Prefer TLSF over realloc-pool for LuaProc
With 4MB RAM and 1.5MB locked base memory (C++ bindings),
TLSF has a better worst-case performance (-20% std-dev
execution time compared to realloc-pool).

Even though on average Realloc-Pool performs better (-9%
average time, compared to TLSF).
2020-02-06 17:30:22 +01:00
Robin Gareus
6f5d6e9ba2 Fix rt-safety of LuaProc w/o chanmapping
Since Lua function arguments are not typed, there is no
explicit "const", and a function can always modify the parameter.

When passing `ChanMapping const&` as argument, the object is
copy constructed. In this specific case the std::map<> members
of ChanMapping allocate memory.

Passing a pointer to the object works around this issue.

LuaBridge later dereferences the object as needed when calling
c++ methods, and copy-construction would only happen later.
2020-02-06 17:30:22 +01:00
Robin Gareus
01a75c04b1 Fix rt-safety (const reference, not const copy)
PluginInsert (and a few other places) iterate over channel
mappings using a const iterator. However mappings()
allocated memory since it was copied
2020-02-06 17:30:22 +01:00
Robin Gareus
016970df25 Readable and AudioROM Lua script examples 2020-02-06 17:30:22 +01:00
Robin Gareus
00fcf6719c Update DSP::Convolution
Expose zita-convolver bindings, to allow for
custom NxM convolution matrices, and dedicated FIR processors.
2020-02-06 17:30:22 +01:00
Robin Gareus
bfebe43a02 Audio ROM Lua Bindings 2020-02-06 17:30:21 +01:00
Robin Gareus
3483c3589a Add a Read Only Memory Audio Source
This will come in handy for FIR, or short samples in combination
with a Lua convolution processor.
2020-02-06 17:30:21 +01:00
Robin Gareus
5d3feaf91b Add Lua Bindings for Readable c'tor 2020-02-06 17:30:21 +01:00
Robin Gareus
56c1fa0c90 Break out API to create readables from files 2020-02-06 17:30:21 +01:00
Robin Gareus
34c4602e61 Lua Array, assert indices > 0 2020-02-06 17:30:21 +01:00
Robin Gareus
fbacb13d2d Extend Lua binding for static methods
This add support for Lua bindings for static member
functions in weak/share ptr class bindings.
2020-02-06 17:30:21 +01:00
Paul Davis
ee43db8b54 revert/change part of a666429d12 so that user-selected non-plugin MIDNAM model names are still shown (they were already used) 2020-02-05 12:53:15 -07:00
Paul Davis
be45193f3f fix old bug from 2007 (bbf4175713) in which a return statement was accidentally (presumably) dropped 2020-02-05 12:53:15 -07:00
Ben Loftis
7e6427e667 Auto-Input should default ON (per irc discussion) 2020-02-04 13:12:23 -06:00
Ben Loftis
a9b614fc18 Fix a potential case where PresentationInfo type flag is not set (see comment for details) 2020-02-04 13:08:21 -06:00
Nikolaus Gullotta
00d1a0ed4d Mixer Reset now resets automation state of all plugin inserts 2020-02-03 16:07:13 -06:00
Nikolaus Gullotta
a655997749 Add more options to Mixer Reset script
Added the ability to unassign all slavables from their VCAs, and to
reset record enable controls
2020-02-03 15:38:37 -06:00
Robin Gareus
788d77fe5c Initialize uninitialized variable (Session StateProtector) 2020-02-03 17:29:48 +01:00
Nikolaus Gullotta
70f72800c1 Fix plugin removal in Reset Mixer script
Removing processors while iterating over the route invalidates the
loop. Instead, queue the plugins for later handling
2020-01-31 09:16:57 -06:00
Robin Gareus
cb09a0884b Clarify stop-at-marker transport position logic 2020-01-31 02:11:41 +01:00
Robin Gareus
e03136646d Fix "stop at marker" script for A6 2020-01-31 01:49:56 +01:00
Robin Gareus
d14d396967 Lua bindings for locations and locate disposition 2020-01-31 01:45:07 +01:00
Robin Gareus
44e55c501e Add some const'ness 2020-01-30 23:35:37 +01:00
Robin Gareus
d887f5965a Fix assert() when removing track(s)
ARDOUR::Session::remove_routes() explicitly calls
save_state (_current_snapshot_name)

Update assert() to treat an empty name
equivalently as explicitly specified _current_snapshot_name
2020-01-30 21:08:02 +01:00
Nikolaus Gullotta
d4f816c158 NOP: Convert spaces to tabs a-la style-guide
I forgot to include this in 454a2d0
2020-01-30 13:48:21 -06:00
Nikolaus Gullotta
454a2d0cce NOP: Convert back to using tabs instead of spaces
See Ardour style guide rule #27 for reasoning
2020-01-30 13:43:40 -06:00
Robin Gareus
cfea85b496 Use session-version when loading processor state
Stateful::loading_state_version vs.
Stateful::current_state_version

See also 0a5837ec71
2020-01-30 18:52:32 +01:00
Robin Gareus
d72b44b5a4 Fix scripted/meta session templates 2020-01-30 18:09:01 +01:00
Nikolaus Gullotta
e468b291cd NOP: Convert tabs to spaces, trim whitespace 2020-01-30 09:10:11 -06:00
Nikolaus Gullotta
327cd513d3 Update mixer Store/Recall to work with new published bus controls 2020-01-30 09:10:11 -06:00
Robin Gareus
6069c870f8 Fix recursive locks during undo/redo due to state save
undo may restore locations, which may trigger a state-save.
This can result in a deadlock:

Location::set_state () -> Locations::get_state()
both acquire a the same lock:

#2  0x000055a8421836d0 in Glib::Threads::Mutex::Lock::Lock(Glib::Threads::Mutex&) (this=0x7ffe38dcad40, mutex=...) at /usr/include/glibmm-2.4/glibmm/threads.h:687
#3  0x00007fc637731e9c in ARDOUR::Locations::get_state() (this=0x55a8466d4740) at ../libs/ardour/location.cc:1075
#4  0x00007fc637bf14b7 in ARDOUR::Session::state(bool, ARDOUR::Session::snapshot_t, bool)
   (this=0x55a846d0f050, save_template=false, snapshot_type=ARDOUR::Session::NormalSave, only_used_assets=false) at ../libs/ardour/session_state.cc:1406
#5  0x00007fc637bed2c8 in ARDOUR::Session::save_state(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, bool, bool, bool, bool)
   (this=0x55a846d0f050, snapshot_name="", pending=true, switch_to_snapshot=false, template_only=false, for_archive=false, only_used_assets=false) at ../libs/ardour/session_state.cc:815
#6  0x00007fc637b4d967 in ARDOUR::Session::auto_punch_start_changed(ARDOUR::Location*) (this=0x55a846d0f050, location=0x55a848fe11d0) at ../libs/ardour/session.cc:1395
#7  0x00007fc637b4da21 in ARDOUR::Session::auto_punch_end_changed(ARDOUR::Location*)
   (this=0x7fc637b4da21 <ARDOUR::Session::auto_punch_end_changed(ARDOUR::Location*)+67>, location=0x7ffe38dcbf10) at ../libs/ardour/session.cc:1403
[..]
#14 0x00007fc637730a2a in ARDOUR::Location::set_state(XMLNode const&, int) (this=0x55a848fe11d0, node=..., version=6000) at ../libs/ardour/location.cc:715
#15 0x00007fc637732428 in ARDOUR::Locations::set_state(XMLNode const&, int) (this=0x55a8466d4740, node=..., version=6000) at ../libs/ardour/location.cc:1130
#16 0x000055a842388dd7 in MementoCommand<ARDOUR::Locations>::undo() (this=0x55a84d1e5f10) at ../libs/pbd/pbd/memento_command.h:141
#17 0x00007fc635b50707 in UndoTransaction::undo() (this=0x55a84d513b80) at ../libs/pbd/undo.cc:128
#18 0x00007fc635b50e1c in UndoHistory::undo(unsigned int) (this=0x55a846d11338, n=0) at ../libs/pbd/undo.cc:267
#19 0x00007fc637c0dfff in ARDOUR::Session::undo(unsigned int) (this=0x55a846d0f050, n=1) at ../libs/ardour/session_state.cc:5577
2020-01-30 04:16:19 +01:00
Robin Gareus
0d127813fb Allow StateProtector to save pending files
This is in preparation for saving state while the session is
record-arm'ed. Most notably config changes and undo/redo.

In case both normal and pending save happens, pending must be
last and is required to recover from crashes during recording.
2020-01-30 04:12:19 +01:00
Robin Gareus
998fadda57 Add some sanity checks for Session::save parameters 2020-01-30 04:09:48 +01:00
Robin Gareus
6452f62d64 Cont'd work on loading old route templates
This builds on top of 51d2bb:
 * v6 routes templates/states have a version per <Route>
 * older route-states are assumed to be from ardour-5
   Stateful::loading_state_version 3002,
   unless specified otherwise
2020-01-30 01:08:57 +01:00
Robin Gareus
51d2bb36ce Save/Use state-version with route templates
Currently using Ardour-5 route templates (state version "3002")
with Ardour6 fails. As opposed to session-templates, Route
templates were not versioned.

This ensures future compatibility (and may allow to interpret
unversioned templates as "3002")
2020-01-29 23:20:37 +01:00
Andreas Müller
015d4d3642 Find fmt-binding in out-of-tree building
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
2020-01-29 19:41:12 +01:00
Nikolaus Gullotta
39dac5b20f Fix tests failing to build by adding LIB_FFTW3F 2020-01-29 10:12:04 -06:00