13
0
Commit Graph

16763 Commits

Author SHA1 Message Date
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
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
8ba7df9105
Add input port signal meters, scopes and monitors 2021-01-08 18:39:56 +01:00
9a7379dfff
Add a CircularSampleBuffer for input port scopes 2021-01-08 18:39:56 +01:00
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
728d2a3771
VKeybd: include port-name in dropdown #8535 2021-01-08 16:33:29 +01:00
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
20029ec7e6 canvas/ruler: provide option for a second font to be used for "major" marks 2021-01-03 16:50:18 -07:00
d92d707180
Extend plugin parameter Lua bindings 2021-01-03 17:24:21 +01:00
9ff3dc8251
NO-OP: cleanup API, reorder and re-indent code 2021-01-02 16:48:59 +01:00
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
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
7f9d5be11c
ACE Fluidsynth: consistent port-names 2020-12-30 19:01:58 +01:00
768d8362cd
VST3: Amend 15864be609 set numI/O correctly 2020-12-30 18:52:16 +01:00
f3e6ca7c1a
Ignore inline-display unless plugin-meta data explicitly mentions it 2020-12-30 18:50:02 +01:00
1ade88edef
Fix ACE.lv2 inline-display meta-data 2020-12-30 18:48:47 +01:00
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
62ac7c6a80
VST3: Announce IPlugFrame interface support 2020-12-30 14:36:26 +01:00
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
d741f01ad0
NO-OP: whitespace 2020-12-30 03:25:57 +01:00
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
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
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
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
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
e4249b97ff
Add code to debug waveform peak-data 2020-12-21 21:37:45 +01:00
b8e336b973
Add API to clear waveform cache 2020-12-21 21:12:53 +01:00
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
3290d66a43
Fix typo in OSC gain feedback message 2020-12-17 00:58:28 +01:00
d8ee0fbf33
Tweak fluidsynth performance on ARM CPUs 2020-12-12 22:03:05 +01:00
5e76d63c06
Resolve some Xcode12 C++11, sigc++ issues 2020-12-12 04:46:22 +01:00
1db219b3d8
Fix compilation with mingw/gcc-8 2020-12-10 20:21:29 +01:00
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
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
062aeb0262
Bail out if export cannot be started 2020-12-08 01:10:00 +01:00
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
13e6fdb6b3
Ensure ringbuffers are never copy-constructed 2020-12-07 02:54:51 +01:00
bc9b94dfab
Fix -Wcatch-value in unit-tests 2020-12-06 22:06:59 +01:00
e750cab915
LuaDSP use vectorized peak-finding 2020-12-06 22:06:55 +01:00
34769a9062
NO-OP: whitespace 2020-12-03 22:10:26 +01:00
60901d26b7
ALSA: improve debug output 2020-12-03 21:29:21 +01:00
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
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
7e9d4f9e73 Fix C function prototypes
This fixes Wstrict-prototypes warnings.
2020-12-01 12:08:09 +01:00
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
91f15300b8 Remove support for deprecated LV2 event extension 2020-12-01 11:40:35 +01:00
80a22953b0 Remove support for the long-deprecated LV2 uri-map extension
This has been supplanted by the urid extension.
2020-12-01 11:40:35 +01:00
d5a2f6b2e0
Add Lua binding to get a file's basename 2020-11-30 22:15:26 +01:00
b043336c86
Fix monitor-sends with templates
This fixes an issues with missing monitor-sends when creating
a session from a template with monitor-section, or when creating
tracks from a route-template.
2020-11-27 00:11:41 +01:00
a62fd0379e
Consolidate monitor-send setup 2020-11-26 23:58:15 +01:00
52f62f0c14
Possible fix for linking with new libdbus
libdbus_1_la-dbus-sysdeps-pthread.o): in function _dbus_platform_condvar_new':
undefined reference to pthread_condattr_setclock’
2020-11-26 00:50:56 +01:00
8d0a655608
VST3: cleanup, drop references (2/2) 2020-11-25 05:33:53 +01:00
3a74c5e602
VST3: add more debug messages 2020-11-25 02:20:37 +01:00
5e853d0977
VST3: fix plugin bus configuration
This fixes crashes when configuring some plugins that have more
input busses than output busses. e.g. TDR Nova.
2020-11-25 02:18:22 +01:00
ce43161d4e
WebSockets: log hostname and listen-port 2020-11-23 20:12:57 +01:00
80e3c191e4
Pulseaudio: allow steam being suspended during export
When exporting long sessions with freewheeling, pulseaudio
may meanwhile suspend the corked audio device. The "FAIL_ON_SUSPEND"
option then prevents ardour to uncork it after export, and the
audio-backend is halted.
2020-11-22 21:41:47 +01:00
da4d1cd779
Yet another export fix (amend a529122249) 2020-11-22 20:44:45 +01:00
ef8eb36189
Fix export (amend a529122249) 2020-11-22 20:20:05 +01:00
767d5f93ba
Fix segfault when plugin insantiation fails
*PluginInfo::load() eventually calls `plugin->set_info()`
which depends on a valid PluginPtr. The method needs to return
early if `plugin` is unset or null.
2020-11-21 22:28:48 +01:00
a529122249
Optimize stem and direct-out export 2020-11-20 20:14:52 +01:00
a1f40979bd
VST3: fix failed c'tor case
~VST3PI() may call terminate() w/o a VST3 component.
2020-11-20 19:48:39 +01:00
a329de9d2f
NO-OP: help out clang-analyzer 2020-11-20 19:42:33 +01:00
7d4cd5c76a
Fix C++11ism 2020-11-20 13:32:20 +01:00
6ca4980e71
FP8: Allow to sort plugin-params by priority 2020-11-20 06:04:32 +01:00
3ac7e11eea
Support lv2:port-props:displayPriority 2020-11-20 06:03:49 +01:00
7558c1316e
VST3: inform plugins about last bar 2020-11-20 02:07:49 +01:00
50d8eff0d6
Allow const tempo-map lookups 2020-11-20 02:07:37 +01:00
luna
8f00826803
Make sure VST3 projectTimeMusic is updated 2020-11-20 01:43:21 +01:00
Luciano Iam
9ee828b47b
WS: properly support MIDI strips 2020-11-19 17:03:36 +01:00
Porrumentzio
a8d924d9e1
Update and rework Basque translation 2020-11-19 16:48:58 +01:00
Hector Martin
4b9e46f11d Fix normalization in Temporal::Beats for times between -1 and 0 beats
Also fix normalization of times with negative beats and positive ticks
2020-11-18 13:40:31 -07:00
ff51e315e3
VST3: fix kMaxSendLevel, on Mixbus 15dB gain can be added 2020-11-17 14:54:31 +01:00
5a27cb9780
Fix copy/edit in 0d8f4eb95a 2020-11-17 03:16:30 +01:00
5fd2d6cc81
VST3: add debug message for preset/state restore 2020-11-17 02:44:11 +01:00
0d8f4eb95a
VST3: Fix uninitialized variable, likely fixes #8460 2020-11-17 02:43:55 +01:00
4a8e9f28f3
VST3: unconditionally set controller's component state
This synchronizes component and controller when loading presets
like the VST3 SDK does.
2020-11-17 00:56:54 +01:00
de76d583b4
Remove unused variable 2020-11-17 00:16:36 +01:00
f9e9c6248d
Initialize inline_ctrl variable, fix erratic inline ctrls 2020-11-16 18:27:09 +01:00
5950df2b74
VST3: fix duplicate plugin list (windows bundle vs dll) 2020-11-16 18:26:29 +01:00
f149a82688
Add support for RIFF and ID3v2 tags (wav, aiff) 2020-11-14 19:30:54 +01:00
a95d87ef6e
NO-OP: whitespace and private variable-name
This pipes export source-code though clang-format, and some
manual cleanup step.
2020-11-14 17:44:48 +01:00
fec37c58bd
Flush plugins from rt-thread, prevent concurrent processing
Route::realtime_handle_transport_stopped() does have insufficient
information (PostTransportLocate), so "flush" is called from
Route::non_realtime_transport_stop in the butler thread.

However plugin de/activate() must not be called concurrently with
processing. e.g. https://lv2plug.in/ns/lv2core explicitly states:

"Hosts MUST guarantee that: An Instantiation function for an instance
is never called concurrently with any other function for that instance."
2020-11-14 02:49:50 +01:00
40edc10f4b update libs RU translation (Alexandre Prokoudine) 2020-11-13 13:17:30 -07:00
5b182f65be transport: remove apparently unnecessary code related to locates with auto-play turned off 2020-11-12 18:54:44 -07:00
8b048bb351 transport: use butler seek count, not PostTransportLocate to decide whether to call non_realtime_locate(), and update butler seek count at end 2020-11-12 18:54:44 -07:00
ef4d825232 TransportFSM: set _last_locate when doing an interrupted locate 2020-11-12 18:54:44 -07:00
ab6a1d062d add new butler seek counter 2020-11-12 18:54:44 -07:00
ee74a932c6
Zero length Events are illegal
This would later trigger an assert() in MidiRingBuffer<T>::read
when reading the status-byte, and cause undefined behavior down
in optimized builds.

It is unsure if this can happen, but it may explain
https://marcan.st/paste/LHDXNQ9x.txt
2020-11-12 16:51:48 +01:00
d3eab4e309
Prevent duplicate meters when importing tempo-map #8449
The file linked from the bug report has a meter-change
in the middle of a bar. Ardour maps this back to the previous
bar, which already has a meter-change. Session load fails with
  "Multiple meter definitions found at 473"

The tempo-map of the file ends like this:
```
  Meter 11/32 @227040 (beat 473)
  Meter 4 / 4 @227680 (beat 483.666667)
```
2020-11-11 18:48:51 +01:00
81862f8c30
Allow to move pulse stream #8467
This potentially breaks various assumptions (e.g. no resampling,
fixed buffersize) when the stream is moved to a different device.
Then again it's pulseaudio, which is unsuitable for pro-audio to
begin with.
2020-11-11 15:59:26 +01:00
ff7bd23661
NO-OP: comments 2020-11-10 19:31:25 +01:00
512b47c878
micro-optimization (skip atomic test) 2020-11-10 19:31:09 +01:00
01cdaa49b4
Fix gcc-4.x/C++98 builds (amend f87de76b9f)
This resolves error: invalid use of 'unary *' on pointer to member
error: 'volatile gint RCUManager<std::map<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::shared_ptr<ARDOUR::Port>, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::shared_ptr<ARDOUR::Port> > > > >::active_reads' is protected
2020-11-10 18:41:27 +01:00
b1846a578d
NO-OP: whitespace, doxygen formatting and naming 2020-11-10 17:05:22 +01:00
Hector Martin
f87de76b9f
RCU: Fix race condition between writer/reader
This uses an atomic counter and spins only on the writer side, which
preserves realtime behavior on the reader side. The spinning yields (by
using the same Boost function from Boost spinlocks) to be
scheduler-friendly.

Fixing this bug also lets us be able to confidently drop garbage early
in the writer if appropriate, so do that and avoid keeping dead wood if
possible.

This reverts commit f95439a502:
"add spinlock to RCU manager to protect concurrent reader() and update() calls"
2020-11-10 17:05:16 +01:00
Hector Martin
55c2c9db7e Add sanity assert in MidiBuffer::insert_event to check for overflow 2020-11-10 21:03:42 +09:00