13
0
Commit Graph

29714 Commits

Author SHA1 Message Date
3df530e7f6
Clean up double/float narrowing math in plugins. 2020-03-30 22:25:21 +02:00
070d8f5ee1
Fix SesionhandlRef when rebuilding peak-files
Since rebuilding peaks does not call drop-references, the WaveView
is not explicitly released. and ArdourWaveView::WaveView
keeps a shared pointer reference to the AudioRegion.

This also fixes a memory leak, waves, tmp_waves store C++ pointers,
not shared pointers. Explicit delete is required
2020-03-30 21:19:43 +02:00
7701e5ecb9
Tweak wording: Rebuild (not reset) 2020-03-30 18:51:08 +02:00
4162f0f1ba
Fix snap if there are no locations - amend 4a036a2da 2020-03-30 18:16:09 +02:00
58bbf358e9
Follow backend API change 2020-03-30 18:00:21 +02:00
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
b6ca576832
Zero x-run counter after GUI completed loading a session
This re-introduces 4262d701eb in a different manner.
2020-03-30 17:43:16 +02:00
a8ff35accb
Reset DSP load on backend re-start and after freewheeling 2020-03-30 16:58:55 +02:00
27b2794133
Add API to reset DSP load state 2020-03-30 16:43:42 +02:00
f866ed6305
Remove duplicate calls 2020-03-30 15:20:54 +02:00
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
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
591c219349 don't mark session as unnamed if -N name given on command line 2020-03-29 20:28:08 -06:00
0cedb68882
Statusbar: fix double-click to reset x-run counter 2020-03-30 03:53:09 +02:00
232b21d289
Statusbar: tweak tooltips 2020-03-30 03:52:20 +02:00
9a505ec671
Statusbar: finishing touches (tooltips, engine-dialog) 2020-03-30 01:40:47 +02:00
b49764edf5
Statusbar: link session property dialog for format & timecode 2020-03-30 01:10:00 +02:00
65e34719bb
Statusbar: respond to mouse-clicks
* open session folder when path label is clicked
* reset x-runs only on x-run label
* allow to reset x-run count via shift+click and double-click
2020-03-30 00:37:49 +02:00
e43cc9c7bb
Statusbar: add session-path display 2020-03-30 00:14:25 +02:00
96b2b35963
Statusbar: increase spacing around the clock 2020-03-29 23:54:56 +02:00
325477803e
Statusbar: fix >24h disk-space label 2020-03-29 23:54:34 +02:00
7a98605748
Statusbar: do not highlight 100% DSP load when freewheeling 2020-03-29 21:05:23 +02:00
a49365ef1e
Statusbar: use white on red as fixed color error highlight 2020-03-29 21:04:21 +02:00
6f4d1f5e2e
Use light font for status-bar labels instead of italic 2020-03-29 21:02:26 +02:00
3c9a5c7ee5
Reorder "WallClock" visibility option to match L->R layout 2020-03-29 19:06:18 +02:00
9076cc60a4
Tweak status-bar layout & design
* remove color: increase contrast, do not use red/green
  foreground because it does no work with various themes
* do use red background to alert users
* use italics for labels heading
* increase spacing between elements
* use mono-space font with DSP load (fixed with) up to 99%
* Fix translations, use compose strings
2020-03-29 18:56:21 +02:00
2cb075bf49
StatusBar: move clock to the right 2020-03-29 18:56:21 +02:00
a43824d8db
Fix typo in prev commit's help message 2020-03-29 18:06:30 +02:00
44f50914cf
Add option to run Lua interpreter interactively from non-ttys 2020-03-29 18:00:53 +02:00
2ceaa98c1c
Fix optimized build crashes (missing return value) - #7958 2020-03-29 15:27:12 +02:00
9d737964d6
Set thread-names (GUI) 2020-03-29 14:56:50 +02:00
c365c6cdb2
Set thread-names (libs) 2020-03-29 14:56:22 +02:00
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
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
9873e1d211
VKeybd: fix stuck keys when changing octaves - #7957
Using the mouse/dropdown to change octaves can lead to stuck
notes when keys are held. This is because the most recently
pressed key, sends key-repeat events.

Using Arrow keys to switch octaves does not cause this problem,
because the most recently pressed key will be an arrow key.

PS. Changing Chromatic Transpose while holding keys still
can lead to stuck notes. This will need a different fix.
2020-03-29 00:47:26 +01:00
7e0abc0dbf
Remove duplicate unit in ctrl-point dialog - #7472 2020-03-28 22:43:37 +01:00
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
Nil Geisweiller
4001ed7515 Initialize keyboard layout based on user preference
Otherwise the Simple QWERTY layout is loaded in the Virtual MIDI Keyboard
regardless of what is set in

Preferences->MIDI->Virtual Keyboard->Virtual Keyboard Layout
2020-03-28 20:36:39 +02:00
6a930c81eb remove noisy and unhelpful log message 2020-03-28 10:59:31 -06:00
82eba76c8f prevent CD markers from being placed at or before session start (#7942) 2020-03-28 10:58:45 -06:00
ead883302f
Don't use shared-pointers in cross thread event structs
This fixes a deadlock when closing the session.

Session::destroy() takes the engine-lock while removing
unhandled session-events. In [1], the event-queue held a last
reference to a Track, and releasing that object triggered
events (here ~IO) that required the lock.

---
[1]

#2  0x0041743a in Glib::Threads::Mutex::Lock::Lock at /home/ardour/linux-armhf/stack/include/glibmm-2.4/glibmm/threads.h:643
#3  0xb67433ba in ARDOUR::IO::~IO at ../libs/ardour/io.cc:105
#4  0xb6743612 in ARDOUR::IO::~IO at ../libs/ardour/io.cc:111
#5  0xb6758e66 in boost::checked_delete<ARDOUR::IO> at /home/ardour/linux-armhf/stack/include/boost/core/checked_delete.hpp:34
#6  0xb675912c in boost::detail::sp_counted_impl_p<ARDOUR::IO>::dispose at /home/ardour/linux-armhf/stack/include/boost/smart_ptr/detail/sp_counted_impl.hpp:92
#7  0x004178d8 in boost::detail::sp_counted_base::release at /home/ardour/linux-armhf/stack/include/boost/smart_ptr/detail/sp_counted_base_sync.hpp:129
#8  0x00417986 in boost::detail::shared_count::~shared_count at /home/ardour/linux-armhf/stack/include/boost/smart_ptr/detail/shared_count.hpp:426
#9  0xb662343a in boost::shared_ptr<ARDOUR::IO>::~shared_ptr at /home/ardour/linux-armhf/stack/include/boost/smart_ptr/shared_ptr.hpp:341
#10 0xb6a4af7a in ARDOUR::Route::~Route at ../libs/ardour/route.cc:282
#11 0xb6b9404c in ARDOUR::Track::~Track at ../libs/ardour/track.cc:71
#12 0xb697164a in ARDOUR::MidiTrack::~MidiTrack at ../libs/ardour/midi_track.cc:94
#13 0xb697177a in ARDOUR::MidiTrack::~MidiTrack at ../libs/ardour/midi_track.cc:96
#14 0xb6ac525a in boost::checked_delete<ARDOUR::MidiTrack> at /home/ardour/linux-armhf/stack/include/boost/core/checked_delete.hpp:34
#15 0xb6acde00 in boost::detail::sp_counted_impl_p<ARDOUR::MidiTrack>::dispose at /home/ardour/linux-armhf/stack/include/boost/smart_ptr/detail/sp_counted_impl.hpp:92
#16 0x004178d8 in boost::detail::sp_counted_base::release at /home/ardour/linux-armhf/stack/include/boost/smart_ptr/detail/sp_counted_base_sync.hpp:129
#17 0x00417986 in boost::detail::shared_count::~shared_count at /home/ardour/linux-armhf/stack/include/boost/smart_ptr/detail/shared_count.hpp:426
#18 0xb664dca6 in boost::shared_ptr<ARDOUR::Track>::~shared_ptr at /home/ardour/linux-armhf/stack/include/boost/smart_ptr/shared_ptr.hpp:341
#19 0xb6aaf67e in ARDOUR::SessionEvent::~SessionEvent at ../libs/ardour/ardour/session_event.h:42
#20 0xb6a91a88 in ARDOUR::Session::destroy at ../libs/ardour/session.cc:753
#21 0xb6a8fb20 in ARDOUR::Session::~Session at ../libs/ardour/session.cc:460
#22 0xb6a9075e in ARDOUR::Session::~Session at ../libs/ardour/session.cc:46
2020-03-28 17:31:12 +01:00
6f1b0ce3d0
Add Lua bindings to check engine status 2020-03-28 14:56:29 +01:00
34e68fe5e2
Automatic backend selection, and fix backend option parsing
python ''.split(',') returns an array with an empty string,
it does not evaluate to false.
2020-03-28 14:56:29 +01:00
4a036a2daa Grid: explicitly check for empty marker list (fixes: grid fails if no start+end markers yet) 2020-03-28 08:10:36 -05:00
b279c42158
Create write sources for template/dup tracks - #7940
This fixes a crash with missing [MIDI] write-sources after
duplicating tracks [1]: Stealing write-source name fails, because
there is no write-source.

When duplicating tracks, reset_write_sources() is called before
any playlists are set [2]. So no new write-sources are created
because _playlists[DATA-TYPE] is empty.

During normal track creation write-sources are usually added
by the input-change handler [3]. However in this case the
state has been set, and since there is no change,
DiskWriter::configure_io does not call use_new_write_source()


NB. This also re-creates write-source when playlists are changed.

-=-
[1]
#3 0x00007f4420690102 in __GI___assert_fail at assert.c:101
#4 0x0000562bfa300dc9 in boost::shared_ptr<ARDOUR::SMFSource>::operator->() const at /usr/include/boost/smart_ptr/shared_ptr.hpp:734
#5 0x00007f442579ffa1 in ARDOUR::DiskWriter::steal_write_source_name[abi:cxx11]() at ../libs/ardour/disk_writer.cc:1290
#6 0x00007f4425e476b6 in ARDOUR::Track::steal_write_source_name[abi:cxx11]() at ../libs/ardour/track.cc:476
#7 0x00007f4425d060a2 in ARDOUR::Session::create_midi_source_by_stealing_name at ../libs/ardour/session.cc:4955
#8 0x0000562bf9ed39ab in MidiTimeAxisView::add_region at ../gtk2_ardour/midi_time_axis.cc:1650
#9 0x0000562bf9b05f2a in Drag::add_midi_region at ../gtk2_ardour/editor_drag.cc:568

-=-
[2]
#0 0x00007ffff7582e2f in ARDOUR::DiskWriter::reset_write_sources at ../libs/ardour/disk_writer.cc:946
#1 0x00007ffff757fce6 in ARDOUR::DiskWriter::set_state at ../libs/ardour/disk_writer.cc:333
#2 0x00007ffff7a81c93 in ARDOUR::Route::set_processor_state at ../libs/ardour/route.cc:3054
#3 0x00007ffff7a7f5d5 in ARDOUR::Route::set_state at ../libs/ardour/route.cc:2697
#4 0x00007ffff7c2aa1d in ARDOUR::Track::set_state at ../libs/ardour/track.cc:172
#5 0x00007ffff794f204 in ARDOUR::MidiTrack::set_state at ../libs/ardour/midi_track.cc:152
#6 0x00007ffff7b7e06b in ARDOUR::Session::XMLRouteFactory at ../libs/ardour/session_state.cc:1890
#7 0x00007ffff7addf7e in ARDOUR::Session::new_route_from_template at ../libs/ardour/session.cc:3048
#8 0x000055555621329a in DuplicateRouteDialog::on_response(int) at ../gtk2_ardour/duplicate_routes_dialog.cc:194

-=-
[3]
#0 0x00007ffff7583243 in ARDOUR::DiskWriter::use_new_write_source at ../libs/ardour/disk_writer.cc:996
#1 0x00007ffff75831c7 in ARDOUR::DiskWriter::reset_write_sources at ../libs/ardour/disk_writer.cc:989
#2 0x00007ffff75851ea in ARDOUR::DiskWriter::configure_io at ../libs/ardour/disk_writer.cc:1335
#3 0x00007ffff7a7b308 in ARDOUR::Route::configure_processors_unlocked at ../libs/ardour/route.cc:1912
#4 0x00007ffff7a79e4b in ARDOUR::Route::configure_processors at ../libs/ardour/route.cc:1719
#5 0x00007ffff7a86695 in ARDOUR::Route::input_change_handler at ../libs/ardour/route.cc:3632
2020-03-28 02:37:37 +01:00
97a221f1bb
NO-OP: whitespace 2020-03-28 01:25:44 +01:00
08065e87b5
Minor code cleanup - consolidate variables & scope 2020-03-28 01:25:44 +01:00
9b84e61fab
Fix incorrect timestretch duration - #7943
Completing readout available() returns 0, until all
background threads have finished and joined.

This also improves performance by feeding suggested/required
amount of samples on every process() call.
2020-03-28 01:25:44 +01:00
918eacdfa7 NOOP: remove newlines 2020-03-27 12:40:44 -06:00
ef3c4a17fc display MIDI qtr msgs in the MIDI tracer window 2020-03-27 12:37:44 -06:00