Commit Graph

16764 Commits

Author SHA1 Message Date
Robin Gareus
548db7a9a4 NO-OP: code formatting and cleanup, thanks clang-format 2021-01-08 18:39:57 +01:00
Robin Gareus
e644cb4577 Do not hold RegionWriteLock while emitting signals
Various playlist operations can change region-properties
which results in Region::send_change being emitted while
the Playlist::RegionWriteLock is held.

This can result in recursive lock and/or deadlocks or crashes. e.g.
Insert time -> Playlist::shift -> Region::RegionPropertyChanged
-> EditorSummary::set_background_dirty -> Editor::session_gui_extents
-> Playlist::get_extent -> read-lock is taken after write-lock.
2021-01-08 18:39:57 +01:00
Robin Gareus
ba123dfe87 Cache playlist extents
Calculating the extents iterates over all regions which
can be expensive. Ardour's GUI calls this periodically to
calculate session_gui_extents().
2021-01-08 18:39:56 +01:00
Robin Gareus
8ba7df9105 Add input port signal meters, scopes and monitors 2021-01-08 18:39:56 +01:00
Robin Gareus
9a7379dfff Add a CircularSampleBuffer for input port scopes 2021-01-08 18:39:56 +01:00
Robin Gareus
303d7bb2e8 Do not allow feedback override on foldback sends
FoldbackStrip::update_send_box() GUI relies on ->fed_by() to
determine if a FB bus has a send from a route.

Under the hood this uses direct_feeds_according_to_reality()
and InternalSend::feeds(). When `allow_feedback` is set a send is
assumed to not directly feed a target (to allow loopbacks).

This mode must not be used for foldback sends.
2021-01-08 18:39:07 +01:00
Robin Gareus
728d2a3771 VKeybd: include port-name in dropdown #8535 2021-01-08 16:33:29 +01:00
Robin Gareus
af29e7483b VKeybd: use a non-translatable port-name (1/2)
This improves session portability, only the "pretty name" should
be visible to the user.
2021-01-08 16:33:29 +01:00
John Emmas
ef7a5e1b00 For 64-bit compilation, MSVC no longer supports inline assembly 2021-01-07 09:22:43 +00:00
Martin Vlk
e84cec0842 Fix "R/L". 2021-01-06 18:40:45 +01:00
Paul Davis
20029ec7e6 canvas/ruler: provide option for a second font to be used for "major" marks 2021-01-03 16:50:18 -07:00
Robin Gareus
d92d707180 Extend plugin parameter Lua bindings 2021-01-03 17:24:21 +01:00
Robin Gareus
9ff3dc8251 NO-OP: cleanup API, reorder and re-indent code 2021-01-02 16:48:59 +01:00
Robin Gareus
cd72bbb2d4 Make AVX/FMA support optional
Older compilers do not yet have fmaintrin.h. This fixes compile errors:
```
x86_functions_fma.cc:51:39: error: '_mm_fmadd_ss' was not declared in this scope
x86_functions_fma.cc:85:35: error: '_mm256_fmadd_ps' was not declared in this scope
x86_functions_fma.cc:106:35: error: '_mm256_fmadd_ps' was not declared in this scope
x86_functions_fma.cc:129:39: error: '_mm_fmadd_ss' was not declared in this scope
```
2021-01-02 16:41:43 +01:00
Ayan Shafqat
c856a862af Add unit test for FMA extension routine 2021-01-01 21:08:06 +01:00
Ayan Shafqat
407882d23d Add support for Intel/AMD's FMA extension
By supporting FMA extension, the number of instruction needed
for multiply accumulate to mix channels are reduced. Since,
this extension has been around since middle of 2012, more
computers have this instruction set available.
2021-01-01 21:05:16 +01:00
Robin Gareus
4a9a4bf3de VST3: pre-allocate AudioBusBuffers
This also reverts 768d8362cd since it causes crashes
with various plugins (eg. surge.vst3).

Ardour now provides AudioBusBuffers for all audio I/O busses,
regardless of Ardour using those busses.

This fixes crashes of plugins that ignore ProcessData::numInputs
or ProcessData::numOutputs. Those plugins are expected to check
numChannels and channelBuffers for those excess channels, which are
0, NULL for unused busses.

ProcessData numInputs, numOutputs does correctly reflect actual
busses that are in-use (at most one main and one aux for each direction).
2020-12-30 21:25:03 +01:00
Robin Gareus
7f9d5be11c ACE Fluidsynth: consistent port-names 2020-12-30 19:01:58 +01:00
Robin Gareus
768d8362cd VST3: Amend 15864be609 set numI/O correctly 2020-12-30 18:52:16 +01:00
Robin Gareus
f3e6ca7c1a Ignore inline-display unless plugin-meta data explicitly mentions it 2020-12-30 18:50:02 +01:00
Robin Gareus
1ade88edef Fix ACE.lv2 inline-display meta-data 2020-12-30 18:48:47 +01:00
Robin Gareus
15864be609 VST3: always pass buffers for all audio busses
This should fix an issue with yabridge and MCompressor.
The plugin has two kMain inputs and expects ProcessData:inputs
to always have two entries, even if the second bus is explicitly
disabled.

see https://hastebin.com/ekewojiqep.txt
```
IComponent::activateBus(type = 0, dir = 0, index = 1, state = false)
data.numInputs = 1;
```

TODO: optimize (pre-allocate) if it works as expected
2020-12-30 18:10:17 +01:00
Robin Gareus
62ac7c6a80 VST3: Announce IPlugFrame interface support 2020-12-30 14:36:26 +01:00
Robin Gareus
8a14a7a00b Fix tracking-text offset
If position along a given axis is not tracked, then the
offset was applied repeatedly to the current position.
This caused the coordinate to run away.
2020-12-30 03:26:00 +01:00
Robin Gareus
d741f01ad0 NO-OP: whitespace 2020-12-30 03:25:57 +01:00
Robin Gareus
9ba8166ae8 Cache ffmpeg/transcoder paths
This significantly speeds up loading export formats that use ffmpeg.

A single call to ::transcoder_exe() took 300-400ms on Windows.
With multiple formats using an external transcoder, showing the
export dialog could take to 2-3 sec.
2020-12-22 22:23:43 +01:00
Robin Gareus
239c340527 Do not show blank waveforms in case height is < 1px
Instead draw some lines to indicate that "something" is there.
2020-12-22 13:27:46 +01:00
Robin Gareus
4b0f72e205 Do not bother to render waveforms < 2px high
Those are blank to begin with, nothing is drawn, yet they'd still be
cached.

This may happen during an initial exposure (see 1a49d7d42b),
or when deleting regions.
2020-12-22 05:54:55 +01:00
Robin Gareus
e5e8b7a965 Close peakfile before emitting PeaksReady signal
The file has to be flushed to disk before it can be used.
This fixes an edge case only.

Since PeaksReady() is a cross-thread signal that calls
AudioRegionView::peaks_ready_handler in the GUI thread, the
function [almost] always completed, before the GUI was woken up
to schedule a WaveView render request (which uses the peak-file).
2020-12-22 03:02:54 +01:00
Robin Gareus
b7f367ae26 Allow multi-threaded AudioSource reading
This is needed for threaded peak-file creation. The same
nested source may be accessed multiple times concurrently
(in addition to the butler thread reading it).

This fixes Bitrunner's "filum2020" session randomly showing garbage
waveforms.
2020-12-21 21:55:55 +01:00
Robin Gareus
e4249b97ff Add code to debug waveform peak-data 2020-12-21 21:37:45 +01:00
Robin Gareus
b8e336b973 Add API to clear waveform cache 2020-12-21 21:12:53 +01:00
Robin Gareus
1737dc1869 Revert "Fix typo in OSC gain feedback message"
This was not a typo after all, but a way to show the gain in the
name-display, as per manual:
> In the case where Gainmode is set to position, the track name
> will show the dB value while values are changing.

This reverts commit 3290d66a43.
2020-12-17 17:30:24 +01:00
Robin Gareus
3290d66a43 Fix typo in OSC gain feedback message 2020-12-17 00:58:28 +01:00
Robin Gareus
d8ee0fbf33 Tweak fluidsynth performance on ARM CPUs 2020-12-12 22:03:05 +01:00
Robin Gareus
5e76d63c06 Resolve some Xcode12 C++11, sigc++ issues 2020-12-12 04:46:22 +01:00
Robin Gareus
1db219b3d8 Fix compilation with mingw/gcc-8 2020-12-10 20:21:29 +01:00
Robin Gareus
4ef6ba0039 VST3: allow filename mismatch inside the bundle
This amends 5950df2b74. The VST3 SDK does not recursively search
directories that are bundles IFF the file inside the bundle's
architecture folder matches the bundle's name.

In case there's a file with a different name resides inside the
bundle it is treated as standalone, unbundled plugin.

Since Ardour, PBD::Searchpath always does a recursive search, the
bundled plugins need to be weeded after the fact.

This now follows the VST3 SDK by not just checking the arch name,
but also Contents and bundle.vst3 parent dirnames.
2020-12-09 17:36:14 +01:00
Robin Gareus
fc4b2441dd VST2: relax MIDI port detection
Apparently the official spec suggests singular for canDo
"receiveVstMidiEvent", "sendVstMidiEvent" requests.
However with "receiveVstEvents", "sendVstEvents" the plural form
is used. confusion ensued.


might fix:
https://discourse.ardour.org/t/no-midi-input-for-plugin-which-support-it-littlealterboy-vst/105126
2020-12-08 17:07:50 +01:00
Robin Gareus
062aeb0262 Bail out if export cannot be started 2020-12-08 01:10:00 +01:00
Robin Gareus
f8b5424d9f Fix deadlock during export
When using the export-tool, the very first callback may already be
freewheeling. In this case the first call to the butler also happens
directly from the freewheel process-callback and initial session events
are handled there. Setting PostTransportAdjustPlaybackBuffering
took the process-lock, which caused a deadlock:


Glib::Threads::Mutex::Lock::Lock(Glib::Threads::Mutex&) at /usr/include/glibmm-2.4/glibmm/threads.h:687
ARDOUR::Session::butler_transport_work() at ../libs/ardour/session_transport.cc:1157
ARDOUR::Session::process_export_fw(unsigned int) at ../libs/ardour/session_export.cc:303
ARDOUR::AudioEngine::process_callback(unsigned int) at ../libs/ardour/audioengine.cc:486
ARDOUR::DummyAudioBackend::main_process_thread() at ../libs/backends/dummy/dummy_audiobackend.cc:951
2020-12-08 01:09:57 +01:00
Robin Gareus
13e6fdb6b3 Ensure ringbuffers are never copy-constructed 2020-12-07 02:54:51 +01:00
Robin Gareus
bc9b94dfab Fix -Wcatch-value in unit-tests 2020-12-06 22:06:59 +01:00
Robin Gareus
e750cab915 LuaDSP use vectorized peak-finding 2020-12-06 22:06:55 +01:00
Robin Gareus
34769a9062 NO-OP: whitespace 2020-12-03 22:10:26 +01:00
Robin Gareus
60901d26b7 ALSA: improve debug output 2020-12-03 21:29:21 +01:00
Robin Gareus
b79520d316 VST3: Use a proxy for connecting and passing messages #8481
This separates channels in each direction component <> controller,
preventing recursions.
2020-12-03 02:48:20 +01:00
Robin Gareus
a974a3135e Prevent duplicate search paths
This fixes an issue with VST3 plugins being listed up multiple times
if a user also explicitly adds standard built-in search paths.
2020-12-02 21:34:52 +01:00
David Robillard
7e9d4f9e73 Fix C function prototypes
This fixes Wstrict-prototypes warnings.
2020-12-01 12:08:09 +01:00
David Robillard
0404876d7b Fix reliance on deprecated implicit assignment operators
Either both, or neither, a copy constructor and assignment operator should be
defined.  This fixes Wdeprecated-copy warnings.
2020-12-01 12:03:38 +01:00