Commit graph

14269 commits

Author SHA1 Message Date
Robin Gareus
1ca76c4e18 NO-OP: whitespace 2018-11-07 19:21:10 +01:00
Robin Gareus
197a1e4446 Close files at rec-stop (re-open as needed)
This is in preparation to allow recording .flac files which are either
read or write not cannot be in read/write mode
2018-11-07 19:13:03 +01:00
Robin Gareus
8a4518d76f Remove C++11'ism
While gnu-gcc had `std::map:at const` as non-standard extension
it is n/a for older gcc on OSX.

Surprisingly this const& p() const; performs a tad better as well, likely
due to different exception handling.

Perhaps it is also worth investigating boost::flat_map<> as replacement
for std::map<>, here. Our common case is just a single entry, so using
a std::vector emulated mapping might help.
2018-11-04 15:37:46 +01:00
Robin Gareus
c9bf89392f Fix AudioUnit, missing const in cbef72b8a1 2018-11-04 04:10:07 +01:00
Robin Gareus
8d6d0b3232 Prefer const references for Pin/Channel maps
Another micro-optmization shaving off some ten microseconds for every
plugin. Also copying maps isn't RT-safe.

This may however cause issue if const map references can change
while a plugin is running.
2018-11-04 03:25:36 +01:00
Robin Gareus
e4c7cb1e75 Plugin pin-mapping micro-optimization
Prefer std::map::at() over std::map::operator[] to allow const maps.
For debug builds, there should probably some try{} catch{} along with this.
2018-11-04 02:21:53 +01:00
Robin Gareus
cbef72b8a1 Optimize Plugin connect & run API, use const maps 2018-11-04 02:16:34 +01:00
Robin Gareus
51e33796f1 Optimize Parameter Control Loop
For plugins with 10000 Control Inputs, dynamic_pointer_cast<> overhead
is significant, here ~2msec (~0.2usec per cast, optimized build, i7-5600U,
2.60GHz)
2018-11-04 02:16:34 +01:00
Paul Davis
6bd583803e rename TransportMasterManager::init() to ::set_default_configuration() to make its purpose more clear 2018-11-02 21:52:00 -04:00
Paul Davis
bf2d9e7a34 fix crash during first-run configuration of the application, caused by using an incomplete TransportMasterManager 2018-11-02 21:52:00 -04:00
Johannes Mueller
fe318c0cd5 Create sidechain ports when created from template (#0007680)
When a route with a sidechain is created from a template or by route
duplication the number of ports of the sidechain are set according to the
XMLNode defining the sidechain. Then the names are set according to the name of
the newly created route.

Thus all the pin connections defined in the template are replicated in the
newly created route.
2018-11-01 22:17:01 +01:00
Johannes Mueller
732fd75f9b Update names of sidechains.
When a PluginInsert is created it does not have an owner right away. That's why
a we need to set the sidechains name once the owner is known, in order to
include owner's name into the name.

Furthermore we need to follow renames of the owner.
2018-11-01 18:53:27 +01:00
Robin Gareus
694c5fcfa6 Skip VST version check to detect MIDI inputs
Some plugins return 0 from effGetVstVersion and are hence not detected
as instruments. e.g. VeeSeeVSTRack (VCV). This may also explain why MIDI
port of some other VSTs are not exposed.

Most VST2.4 return 2400, so checking  [effGetVstVersion] >=2 (and not 2000)
was incorrect to begin with.
2018-11-01 15:27:08 +01:00
Robin Gareus
fd832d9d1a Add option to limit automatable control parmaters
VCVRack VST currently exposes 9999 automatable-control parmaters.
This slows down various GUI dropdown lists and dialogs.
(even worse: those parameters are not mapped to anything by default).

This change allows to limit automatable parameters to a reasonable number,
without loosing state of already automated parameters in existing sessions.
2018-10-31 23:44:04 +01:00
Robin Gareus
befa339d4b Remove duplicate call
Automatable::add_control() already does insert a given parameter
to the _can_automate_list list if it's automatable.
2018-10-31 23:44:04 +01:00
Len Ovens
f7b67501a9 OSC: Allow non-cue surfaces to create personal send and ListenBus 2018-10-30 12:15:28 -07:00
Len Ovens
be5a89aa22 Add ListenBus to stripable types 2018-10-30 12:15:28 -07:00
Robin Gareus
5bd9bf868f Safe-guard non-rt-safe sidechain operations
This is required by 7d8b93ad for showing error when actively recording.
It also prevents other UIs (OSC, Lua,..) to change re-configuring
sidechain ports/plugins while recording.
2018-10-29 21:52:47 +01:00
Robin Gareus
383bd2526c Fix incorrect VST callback fall-though (effective NOOP) 2018-10-27 10:33:58 +02:00
Robin Gareus
c1e68c91b5 Fix another compiler warning 2018-10-27 10:33:07 +02:00
Robin Gareus
c98fc1099d Fix some Wimplicit-fallthrough
A "fall through" comment is most portable way to indicate
"no break, fallthru" cases.

 * __attribute__ ((fallthrough))  // is not portable
 * [[fallthrough]]; // is C++17
2018-10-26 14:53:44 +02:00
Robin Gareus
08d205c533 Fix some compiler warnings (exception catches) 2018-10-26 14:25:55 +02:00
Robin Gareus
7c3fd2fe79 Glib throws a const FileError exception 2018-10-26 13:40:03 +02:00
Robin Gareus
770a1a8a36 Fix Lua bindings (music-time, mapping) 2018-10-26 13:38:28 +02:00
Robin Gareus
5599cdb911 Fix race-condition/deadlock, plugin-copy while rolling
lili93's session (#ardour) triggered this w/jackd 512fpp:
Drag/Drop copy a latent plugin from one track to another while rolling.
The GUI-thread as well as the auto-connect thread concurrently call
jack_recompute_total_latencies(). The auto-connect thread holds
a process lock while doing so. The GUI does not use any mutexes.
This randomly deadlocks in libjack.

backtrace: https://pastebin.com/6m3KGhWS
2018-10-25 02:00:08 +02:00
Robin Gareus
d53f49acf4 Fix typo in binding, amend 9bbbc7fbe 2018-10-24 00:16:05 +02:00
John Emmas
c1626bee39 Add some missing link libs to MSVC zita-convolver 2018-10-23 09:55:31 +01:00
Robin Gareus
4e4c6e7d1e Fix an edge-case in Dummy backend's random generator
INT_MAX == 2^31 is not a valid random seed for this LCG.
2018-10-22 15:46:59 +02:00
Robin Gareus
4e1464e70f Sort VST factory presets
This is more of a workaround than a fix. Simply by forcing the
URI to be sortable (VST-user presets are sorted at the end).


This eventually needs a deeper cleanup and API consolidation

PluginInfo::get_presets(bool) returns an ordered std::vector.
However this API is only used in a few cases where the plugin is
not instantiated. PluginInfo::get_presets(bool).

The problem is Plugin::get_presets(). The method returns
information that was previously cached by Plugin::find_presets() in
std::map<URI, ...>
2018-10-22 15:46:59 +02:00
John Emmas
947f6c78b2 Remaining changes needed to build zita-convolver with MSVC 2018-10-22 08:56:22 +01:00
John Emmas
16927d747f Add MSVC support for building the 'zita-convolver' library (which is now needed by libardour) 2018-10-22 08:53:20 +01:00
John Emmas
5003bef0e3 Accommodate newly introduced source(s) in our MSVC project (fluidsynth) 2018-10-22 08:46:59 +01:00
Robin Gareus
504ba49c6d Potential fix for lost VST MIDI events
Ardour's VST MIDI buffer API does not yet implement offsets and limits.
When a cycle is split, the same midi-buffer is used for all sub-divisions
leading to duplicate, offset, events.
2018-10-21 20:48:11 +02:00
Robin Gareus
1229d50e45 MSVC compatibility for zita-convolver 2018-10-21 17:02:14 +02:00
Christopher Arndt
47d341434e Avoid use of 'std::to_string
Signed-off-by: Christopher Arndt <chris@chrisarndt.de>
2018-10-21 01:08:09 +02:00
Christopher Arndt
8e25b4d193 Add plugin version and parameter count to VST user presets
Signed-off-by: Christopher Arndt <chris@chrisarndt.de>
2018-10-21 01:08:09 +02:00
Len Ovens
83a0b1e3a8 Personal monitor now saves and restores 2018-10-19 16:59:44 -07:00
Robin Gareus
4c02780262 Lua bindings for convolution DSP 2018-10-20 00:24:38 +02:00
Robin Gareus
087b8d7f33 Implement basic libardour convolution DSP 2018-10-20 00:24:38 +02:00
Robin Gareus
fec787c8f4 zita-convolver windows/mingw build fix
- semaphore is available,
- pthread_t is not a pointer type (but here it's not used anyway)
2018-10-20 00:24:38 +02:00
Robin Gareus
8e78827deb NO-OP: clang-format whitespace 2018-10-20 00:24:38 +02:00
Robin Gareus
876e780e4d zita-convolver: add namespace & visibility, remove global externs 2018-10-20 00:24:38 +02:00
Robin Gareus
e554d1fad5 Add upstream libzita-convolver 4.0.3 2018-10-20 00:24:38 +02:00
Robin Gareus
c6955d4994 Allow Lua DSP processors to report latency 2018-10-20 00:24:38 +02:00
Len Ovens
777fe3c68f Add personal monitor sends 2018-10-19 08:51:29 -07:00
Robin Gareus
070f370e40 Fix copy/edit in e047b01aa2 2018-10-18 15:07:45 +02:00
Robin Gareus
897258f5f1 Fix scalar initialization of shared_ptr<>. 2018-10-18 04:15:47 +02:00
Robin Gareus
2de7ee24a8 Fluidsynth 2.0 uses anonymous unions (added in c11, or gnu99) 2018-10-18 04:09:25 +02:00
Andreas Müller
5b03c41f6c Follow fluidsynth's API changes introduced with 2.0.0
Updated patch from Andreas Müller <schnitzeltony@gmail.com>
2018-10-18 01:43:43 +02:00
Robin Gareus
abf7905d5f Update Fluidsynth to 2.0.1 2018-10-18 01:43:43 +02:00