Commit graph

15841 commits

Author SHA1 Message Date
Robin Gareus
35aab65d59
Consistent processor labels "Meter"
Track name is implicit, so instead of "meter-<name>", showing a
translatable label "Meter" is sufficient and consistent with "Fader".

Under the hood, for introspection, the processor name remains as is.
2020-04-03 14:49:03 +02:00
John Emmas
fb186aaaa0 2 x new backend/port classes need to be exportable 2020-04-03 10:09:22 +01:00
John Emmas
03f52e622a Add/remove source(s) in our MSVC project (libardour) 2020-04-03 07:15:42 +01:00
Paul Davis
6a6b3f2703 fix another iterator type 2020-04-02 19:45:31 -06:00
Paul Davis
cb4997f4a4 fix iterator type 2020-04-02 19:45:31 -06:00
Paul Davis
af69ac1285 use clear_ports() 2020-04-02 19:45:31 -06:00
Paul Davis
6cdc245967 fix header name 2020-04-02 19:45:31 -06:00
Paul Davis
7fc5a6c971 initial try (not compiled) of PortAudio backend using PortEngineSharedImpl 2020-04-02 19:45:31 -06:00
Paul Davis
72925e4453 use _instance_name in all messages from PortEngineSharedImpl 2020-04-02 19:45:31 -06:00
Paul Davis
e5507f7072 use PortEngineSharedImpl with PulseAudio backend 2020-04-02 19:45:31 -06:00
Paul Davis
04551c39f6 use PortEngineSharedImpl with DummyAudioBackend 2020-04-02 19:45:31 -06:00
Paul Davis
30766c75e8 buildable version of CoreAudio backend using PortEngineSharedImpl 2020-04-02 19:45:31 -06:00
Paul Davis
a31d3689bf tentative changes to extend port engine shared impl to coreaudio 2020-04-02 19:45:31 -06:00
Paul Davis
6c2e30b790 use new PortEngineSharedImpl in AlsaAudioBackend 2020-04-02 19:45:31 -06:00
Paul Davis
9ea6f598bd add new file to wscript 2020-04-02 19:45:31 -06:00
Paul Davis
9461a30a97 refactor shared PortEngine implementation from AlsaAudioBackend 2020-04-02 19:45:31 -06:00
Paul Davis
9ac0d5b60f add RCU to manage _ports and _portmap in AlsaAudioBackend
This is intended to prevent crashes when unregister_port() modifies the contents of these
two members at the same time that something else is iterating over them.
2020-04-02 19:45:31 -06:00
Robin Gareus
21c9505652
Allow to query current effective instrument model/mode
This exposes custom plugin model/mode. It can be useful for
the GUI to detect if effective settings have changed, and
context-menus have to be re-build.
2020-04-03 03:29:32 +02:00
Robin Gareus
dabd5715e9
Revert "move the point of adding a new MIDI track until *after* the instrument is added"
This reverts commit fac8d84786.

This fixes fan-out. The track should be created before any tracks or
busses are created that are fed by the MIDI track.

The apparent motivation for fac8d847 was MIDNAM related
(there was code in the GUI that needed the instrument, which was
called from within ::add_routes).

This should no longer be the case, the GUI needs to pick up
instrument changes after track creation via processors changed;
besides MIDI busses were still created before the instrument.
2020-04-02 21:43:16 +02:00
Robin Gareus
f0b25a776b
Update fan-out signal
* Signals use camelcase.
* use a static signal, independent of the route

Previously the signal was handled by RouteUI, which
caused various issues:
 * the RouteUI may not yet be available
 * There may be many RouteUIs for a single Route
   (mixer, editor-mixer, meter-bridge strips)
2020-04-02 20:27:51 +02:00
Johannes Mueller
06dee15a18 Emit Locate() in ::locate() even if we are not synced_to_engine()
This reverts 05c77db773 (revert necessary due to 4637c49838)

Since 4637c49838 we no longer emit Located() in ::backend_sync_callback().
Therefore we must emit Located() in ::locate() even if we are
synced_to_engine().

Otherwise the playhead is not updated when synced_to_engine() in some
circumstances.
2020-04-02 18:39:46 +02:00
Johannes Mueller
7a2e9bf224 Re-save templates if they have been loaded from an older version of Ardour 2020-04-02 14:37:12 +02:00
Johannes Mueller
687b3078c3 Don't issue VersionMismatch when creating a new session
When we create a new session and are using a template from an old version of
Ardour, we should not issue the VersionMismatch dialog and not make a copy of
the session file for the old version.

We need to extend the signature of Session::load_state() to tell it if we are
creating a session from a template. Session::_is_new cannot be used for it
because it has a the semantics if to auto connect the the master bus.
2020-04-02 14:33:21 +02:00
Robin Gareus
1439610f95
Restart Transport FSM after x-run halt #7951 2020-04-02 03:58:21 +02:00
Robin Gareus
163a065543
Fix gcc-4.2/PPC builds
Old STL has an issue with ambiguity
   reverse_iterator rend();
   const_reverse_iterator rend() const;
2020-04-02 03:43:29 +02:00
Robin Gareus
20ee430fda
Add API to count named MIDNAM controls 2020-04-01 23:25:19 +02:00
Robin Gareus
37bbc70179
Cache instrument plugin MIDNAM model & mode 2020-04-01 23:24:45 +02:00
Paul Davis
195fe0f712 add method to check for xrun status of a marker 2020-04-01 10:10:50 -06:00
Robin Gareus
3b77472ac0
Overhaul InstrumentInfo
* Remove unused direct calls into plugin
* Assume empty model to mean plugin-provided MIDNAM (!)

The route owned Instrument-Info is the central access point used
by the GUI for MIDI name lookups.

At this point in time, custom settings are saved/restored by the
GUI (MidiTimeAxisView). InstrumentInfo provides a volatile store
for MIDNAM mode and model.
2020-04-01 16:31:58 +02:00
Paul Davis
26c6d3c4c9 fix boolean logic PART FOUR when trying to avoid complete_refill heuristic
This reworking avoids some confusion caused by the use boost::optional here
2020-04-01 07:54:44 -06:00
Paul Davis
76070cb8c2 fix boolean logic PART THREE when trying to avoid complete_refill heuristic 2020-03-31 21:47:39 -06:00
Paul Davis
76b6c5ebfd fix boolean logic PART TWO when trying to avoid complete_refill heuristic 2020-03-31 21:44:42 -06:00
Paul Davis
1c82fc4879 fix boolean logic when trying to avoid complete_refill heuristic 2020-03-31 21:14:07 -06:00
Paul Davis
6d0434a3c5 change variable name and debug messages for underrun case (information was misleading/confusing) 2020-03-31 20:54:14 -06:00
Paul Davis
0047dc383f clean up logic for declick out in DiskReader
This is intended to be a no-op that makes the code easier to read/reason about
2020-03-31 20:54:14 -06:00
Paul Davis
88e84067f2 if a locate brings us within a heuristic-specified distance of the current position in a DiskReader, pay attention to loop status
If the last read was not looped, but the new one should be, we need to ignore the heuristic. Ditto for vice-versa.

This isomorphic with the read-reversed case
2020-03-31 20:54:14 -06:00
Robin Gareus
bc1c3e5c21
Postpone disk-i/o setup during session-load
This fixes another assert(), caused by configuring processors,
before set_processor_state() was called.
Route::configure_processors() will be called later.

---
#3  0x00007ffff2472102 in __GI___assert_fail at assert.c:101
#4  0x00007ffff7a8ca1f in ARDOUR::Route::setup_invisible_processors() at ../libs/ardour/route.cc:5013
#5  0x00007ffff7a7a665 in ARDOUR::Route::configure_processors_unlocked at ../libs/ardour/route.cc:1870
#6  0x00007ffff7a79377 in ARDOUR::Route::configure_processors at ../libs/ardour/route.cc:1719
#7  0x00007ffff7a902c0 in ARDOUR::Route::set_disk_io_point at ../libs/ardour/route.cc:6041
#8  0x00007ffff7a7ea0a in ARDOUR::Route::set_state at ../libs/ardour/route.cc:2679
2020-03-31 19:48:17 +02:00
Robin Gareus
5253c7eb8b
Tweak error-dump (when session load fails)
When limiting the message count (e.g. for display in a dialog),
use reverse order, and only print errors.

When loading a session fails, the most recent error is
more likely the real cause.
2020-03-31 18:58:12 +02:00
Robin Gareus
3df530e7f6
Clean up double/float narrowing math in plugins. 2020-03-30 22:25:21 +02:00
Robin Gareus
40e3364c66
Always delegate meter-point positioning to rt-thread
Previously set_state() -> set_meter_point() acquired the
process-lock to change meter-position, usually causing x-runs
when setting route-state.

This also fixes an issue introduced in fd414ec158. After
populating the processor list, force setting the meter-position
looks up the output streams of the processor before the meter.
However the processors are not configured. That will only happen
later from Session::post_engine_init().

---
#3 0x00007ff07b7d4102 in __GI___assert_fail at assert.c:101
#4 0x00007ff080d3224a in ARDOUR::PluginInsert::output_streams() const at ../libs/ardour/plugin_insert.cc:289
#5 0x00007ff080de8c30 in ARDOUR::Route::set_meter_point_unlocked() at ../libs/ardour/route.cc:4106
#6 0x00007ff080de8699 in ARDOUR::Route::set_meter_point(ARDOUR::MeterPoint, bool) at ../libs/ardour/route.cc:4037
#7 0x00007ff080ddfad3 in ARDOUR::Route::set_state(XMLNode const&, int) at ../libs/ardour/route.cc:269
2020-03-30 17:58:35 +02:00
Robin Gareus
a8ff35accb
Reset DSP load on backend re-start and after freewheeling 2020-03-30 16:58:55 +02:00
Robin Gareus
27b2794133
Add API to reset DSP load state 2020-03-30 16:43:42 +02:00
Robin Gareus
f866ed6305
Remove duplicate calls 2020-03-30 15:20:54 +02:00
Robin Gareus
fd414ec158
Assert that plugins are configured before setting custom meter position
This fixes the following issue:
  On the master channel insert the waveform scope before the fader.
  Then set the meter position to custom and move the meter to the
  very beginning of the chain.

Before this change, when set_meter_point() was called the
processor list only contained the Fader (_amp) and no other
processor. _main_outs was not yet present in the list, and
Route::maybe_note_meter_position() triggered an
and assert(_processor_after_last_custom_meter.lock());

See also d0dca7daf0
2020-03-30 15:20:54 +02:00
Robin Gareus
23baeee829
Tweak engine startup, initial silence
This can help when running with very low latency and the
initial process callback is [indirectly] expensive.

E.g. load a heavy session the a RPi4, initial setup can pull
in a lot of data, which blocks the bus.

In particular with the ALSA backend this can lead to poll timeout
which effectively stops the backend.
2020-03-30 15:20:54 +02:00
Robin Gareus
2ceaa98c1c
Fix optimized build crashes (missing return value) - #7958 2020-03-29 15:27:12 +02:00
Robin Gareus
c365c6cdb2
Set thread-names (libs) 2020-03-29 14:56:22 +02:00
Robin Gareus
d6a38d5450
Set public thread name
This allows to identify Ardour thread using standard unix
tools (ps, htop) and inspect priorities, CPU load etc.
2020-03-29 13:55:20 +02:00
Robin Gareus
f81442c3bf
Engine: Silence outputs for 1/2 second when loading a session
This allows for caches to warm up, background worker threads to
spin up and things settle down. This also prevents initial
audible artifacts of live input.

In almost all cases this completes before the GUI is brought up.
2020-03-29 01:44:03 +01:00
Robin Gareus
eea697b260
ALSA backend: try to recover from poll errors
When recover() successfully re-initializes the device,
processing can continue just like after an x-run.

This can happen during initial session load of "expensive"
sessions (in particular on slow systems, e.g. Raspberry Pi)
usually with synths. Worker thread pulls in many external
files in the background which blocks the bus for a long time.
resulting in a poll-timeout.
2020-03-28 22:06:12 +01:00