Commit Graph

29197 Commits

Author SHA1 Message Date
7c6eadd84a
Fix some doxygen warnings 2020-03-02 17:58:03 +01:00
be4bdb5365
Do not include <stdint.h> in the Ardour namespace 2020-03-02 17:58:03 +01:00
8d6f6266d2 unfinished fix for handling desktop/NSM specifying session to load
More work needed to fix requirement in StartupFSM that ::load_from_application_api()
is called before ::start()
2020-03-01 21:36:07 -07:00
6edccc78a2
Fix previous commit (increase max, not default) 2020-03-02 02:26:10 +01:00
86821b3afe
Allow a-delay to boost output gain
From #ardour IRC:
> there have been a few times that I wished a-Delay could boost volume
> it has an "output gain" slider, but it only subtracts. the maximum is 0db
> delay is a big part of guitar solos, so a boost in the same plugin would be awesome
2020-03-02 02:24:43 +01:00
dc195f265d
Fix Luadoc build (follow up 2e9ac80e9, 5794d21a) 2020-03-01 21:26:43 +01:00
c086f05ba5
Fix order setting I/O names
IO::set_name() may fail, in case Port::set_name() fails.
In that case the IOProcessor should not update its name.
2020-02-29 22:20:01 +01:00
814af0f51c
Fix off-by-one, start "Send" names at bitslot 1 (not 2)
Session::next_*_send_id() starts counting at bit 1.
Probably for historical reasons (bit zero = 1).
2020-02-29 22:19:58 +01:00
2b13cfa67c no pre-release warning dialog if beyond pre0 2020-02-29 09:33:10 -07:00
John Emmas
a4449aa0f6 Fix 'samples / frames' typo in PBD::stacktrace() 2020-02-29 14:38:58 +00:00
9712501139
Lua Amplifier plugin with gain-coeff ratio controls 2020-02-29 00:25:51 +01:00
dd2c6e7cf1
Convert v5 send state-state 2020-02-28 21:21:16 +01:00
300063c8b9
Bail out if Playlist cannot be created
This prevents later crashes. Tracks cannot exist without a playlist.
2020-02-28 07:33:11 +01:00
003e68edd2
Display recent session-load errors in the GUI
Dumping errors to stderr only is not very useful. Particularly not
on Windows and MacOS.
Even though a user may not be able to address the issue, this
can lead to better reports vs just printing "corrupt state".
2020-02-28 07:32:17 +01:00
fa0a7d6739
Allow to limit error dump
This is in preparation of displaying verbose errors to the user.
2020-02-28 07:26:13 +01:00
a485195453
Ensure that regions have sources when saving
Otherwise this will lead to a corrupt state:
  ERROR: Session: XMLNode describing a AudioRegion references an unknown source id
  ERROR: Session: cannot create Region from XML description. Can not load state for region
  ERROR: Playlist: cannot create region from XML
and a track without playlist is created, resulting in a later crash.

Eventually SessionPlaylists::load() needs to handle this gracefully,
but this should help catch cases causing the actual issue.
2020-02-28 06:35:33 +01:00
016eaddad7
NO-OP: whitespace, re-indent 2020-02-28 06:08:26 +01:00
4b28e4ee3c
Fix some recursive undo removal
~StatefulDiffCommand() may trigger UndoTransaction::command_death()
which may delete the StatefulDiffCommand() that's just being destroyed.

This depends on the signal-connection order, which is undefined.
In any case when a shared_ptr<> object is being destroyed it means
that all references to it are already gone. There's no need to
emit drop_references from the d'tor.
2020-02-28 06:06:44 +01:00
bf3a36a126
Fix script to bypass all plugins
deactivate() hard bypassed all plugins, this made plugins with
a dedicated en/disable soft-bypass option inaccessible.
2020-02-28 04:34:54 +01:00
1af5f37e46
Restore visible automation lanes (#7914)
On session re-load only automation lanes with events were displayed,
regardless of visibility state. This allowed for inconsistent
state (menu showed them as visible even if they were not).
2020-02-28 02:25:57 +01:00
73c5bdd3cb
Fix double free of undo commands (amend 9e6435ff14)
This fixes a case when deleting a plugin, deletes all automation
undo/redo events:
  <UndoTransaction name="add automation event">
    <MementoCommand type-name="ARDOUR::AutomationList">
   ...


`delete this;` calls the d'tor which emits drop_references(),
that leads to UndoTransaction::command_death() destroying the
object, whichh causes a double free.
2020-02-28 02:09:58 +01:00
54911a0ee2
Fix duplicate control-ID when copying processors or proc state
Ideally we'd use a "retain ID when present", so that GUI object
state of automation lanes and inline controls will be retained.
2020-02-28 00:59:21 +01:00
4eba86b503
Fix libwebsockets compat
LWS_CALLBACK_HTTP_CONFIRM_UPGRADE is only available since v3.1.0
2020-02-27 23:58:00 +01:00
8710a2d943
Dialog default to cancel (#7915)
There are various ways to cancel a dialog. Only checking for
RESPONSE_CANCEL is not sufficient. e.g. Esc causes a delete-event.

 * Gtk::RESPONSE_CLOSE
 * Gtk::RESPONSE_REJECT
 * Gtk::RESPONSE_DELETE_EVENT
 * Gtk::RESPONSE_CANCEL
 * Gtk::RESPONSE_NO

Among others this fixes "Clicking session > open,
then hitting ESC opens the currently selected folder and session"
2020-02-27 23:27:42 +01:00
e5c819956a
Punch/Loop GUI control sensitivity 2020-02-27 22:25:37 +01:00
0b027f7678
Fix removal of punch range
set_auto_punch_location() is a NO-OP when there's no punch range.
This disconnects `punch_connections`, clears session-events,
and emits auto_punch_location_changed().
2020-02-27 22:23:59 +01:00
08559abc10
Add signals to indicate Punch/Loop constraints
This is in preparation for GUI sensitivity of Loop and Punch actions.
2020-02-27 22:16:12 +01:00
Luciano Iam
ef512d412d
Avoid occasional response delay when handling HTTP in the websockets surface 2020-02-27 03:42:54 +01:00
Luciano Iam
0921cf8939
Make previous commit 81ecc2b compatible with libwebsockets==2 2020-02-27 03:42:54 +01:00
Luciano Iam
ec8e0f8ee5
Gracefully reject HTTP requests reaching the websockets surface 2020-02-27 03:42:54 +01:00
bc2cbfc7ec
Prevent concurrent loop and punch recording (backend)
This also prevents switching between punch-in/out record
and looping without transport-stop.
2020-02-27 02:36:16 +01:00
R
b10d9cf09b
Add example Lua DSP script with multiple MIDI outputs 2020-02-26 20:39:21 +01:00
R
8702ff2189
Add support for Lua DSP scripts with multiple MIDI outputs 2020-02-26 20:28:54 +01:00
André Nusser
d1302ae934
And removing even more unused forward declarations. 2020-02-26 20:18:58 +01:00
c3fe0cd95e
Consolidate loop en/disable calls 2020-02-26 20:15:00 +01:00
28accee44e
Update script to use new process_map() API 2020-02-26 17:51:32 +01:00
65425b9fe2
Add a mute/gate plugin 2020-02-26 17:51:25 +01:00
d27cdb3855
Fix DSP::process_map() plugin-pin I/O map handing
The previous approach failed in case where PluginInsert
uses no-inplace buffers with a linear map.
Since buffers are replicated up to a total of number of
all (inputs + outputs), the number of output buffers
could not be determined. There was insufficient information
using the I/O map alone.

With a known number of outputs processing and applying
the i/o map is also a lot easier and faster.

This break the API of process_map().
2020-02-26 17:50:08 +01:00
a5c956883d
Add Lua bindings for libardour amp's simple gain 2020-02-26 17:49:54 +01:00
f372cc0bf2
Fix PI bypass, fix apply linear pin-connections
Previously this could assert(), copying a buffer to itself.
2020-02-26 17:49:01 +01:00
35605ee763
Remove easter-egg
Every day can be x-mas day, how else can we be lovers? :)
2020-02-26 04:03:10 +01:00
69059d7b1b
Fix Conditional jump or move depends on uninitialised value(s)
(valgrind trace, line-numbers from mixbus+6.0-190-g0ec6bc35a)
This may happen initially for unconnected graph nodes,
e.g. Foldback Busses from ARDOUR::Session::post_engine_init().

==29797== Conditional jump or move depends on uninitialised value(s)
==29797==    at 0x6167D3F: trace_terminal(boost::shared_ptr<ARDOUR::Route>, boost::shared_ptr<ARDOUR::Route>, bool) (session.cc:2174)
==29797==    by 0x6167D99: trace_terminal(boost::shared_ptr<ARDOUR::Route>, boost::shared_ptr<ARDOUR::Route>, bool) (session.cc:2174)
==29797==    by 0x6167D99: trace_terminal(boost::shared_ptr<ARDOUR::Route>, boost::shared_ptr<ARDOUR::Route>, bool) (session.cc:2174)
==29797==    by 0x616890D: ARDOUR::Session::resort_routes_using(boost::shared_ptr<std::__cxx11::list<boost::shared_ptr<ARDOUR::Route>, std::allocator<boost::shared_ptr<ARDOUR::Route> > > >) (session.cc:2289)
2020-02-26 01:44:23 +01:00
98d7d04ae7
Fix potential memory corruption at session close
(valgrind trace, line-numbers from mixbus+6.0-190-g0ec6bc35a)
==29797== Invalid write of size 4
==29797==    at 0x619BB3F: boost::dynamic_bitset<unsigned int, std::allocator<unsigned int> >::reference::do_reset() (dynamic_bitset.hpp:120)
==29797==    by 0x6196002: boost::dynamic_bitset<unsigned int, std::allocator<unsigned int> >::reference::do_assign(bool) (dynamic_bitset.hpp:122)
==29797==    by 0x618F670: boost::dynamic_bitset<unsigned int, std::allocator<unsigned int> >::reference::operator=(bool) (dynamic_bitset.hpp:107)
==29797==    by 0x617E426: ARDOUR::Session::unmark_send_id(unsigned int) (session.cc:5633)
==29797==    by 0x6156714: ARDOUR::Send::~Send() (send.cc:125)
==29797==    by 0x5CE12A7: ARDOUR::InternalSend::~InternalSend() (internal_send.cc:71)
==29797==    by 0x5CE1319: ARDOUR::InternalSend::~InternalSend() (internal_send.cc:76)
==29797==    by 0x1556128: void boost::checked_delete<ARDOUR::InternalSend>(ARDOUR::InternalSend*) (checked_delete.hpp:34)
==29797==    by 0x155E689: boost::detail::sp_counted_impl_p<ARDOUR::InternalSend>::dispose() (sp_counted_impl.hpp:92)
==29797==    by 0xCC0E30: boost::detail::sp_counted_base::release() (sp_counted_base_std_atomic.hpp:110)
==29797==    by 0xCC0EA6: boost::detail::shared_count::~shared_count() (shared_count.hpp:426)
==29797==    by 0x134BD15: boost::shared_ptr<ARDOUR::InternalSend>::~shared_ptr() (shared_ptr.hpp:366)
==29797==    by 0x60FACC1: ARDOUR::Route::~Route() (route.cc:498)
==29797==    by 0x60FAF4D: ARDOUR::Route::~Route() (route.cc:517)
==29797==    by 0x166144C: void boost::checked_delete<ARDOUR::Route>(ARDOUR::Route*) (checked_delete.hpp:34)
==29797==    by 0x166338F: boost::detail::sp_counted_impl_p<ARDOUR::Route>::dispose() (sp_counted_impl.hpp:92)
==29797==    by 0xCC0E30: boost::detail::sp_counted_base::release() (sp_counted_base_std_atomic.hpp:110)
==29797==    by 0xCC0EA6: boost::detail::shared_count::~shared_count() (shared_count.hpp:426)
==29797==    by 0xCD2385: boost::shared_ptr<ARDOUR::Route>::~shared_ptr() (shared_ptr.hpp:366)
==29797==    by 0x615D0E5: ARDOUR::Session::~Session() (session.cc:455)
==29797==    by 0x615D4A3: ARDOUR::Session::~Session() (session.cc:461)
2020-02-26 01:35:50 +01:00
61b6b740bc
Fix deadlock, shared_ptr d'tor called from ScopedConnectionList d'tor
See https://ardour.org/styleguide.html #10
https://pastebin.com/gJfrNhL2
2020-02-25 22:55:59 +01:00
bcfe16610a
Consolidate shared-ptr debugging 2020-02-25 22:23:30 +01:00
9e6435ff14
Fix mem-leak, Playlist/Region SessionHandleRef
When a playlist is deleted and drops_references(), any
undo/redo StatefulDiffCommand referncing playlist invoke
Destructible::drop_references() of the Command.

This leads to command_death(). As opposed to UndoTransaction::clear()
the StatefulDiffCommand was not destroyed.

In case of playlists StatefulDiffCommand::_changes contains
PBD::SequenceProperty<std::list<boost::shared_ptr<Region> > >
and shared pointer reference of the playlist regions were kept
indefinitely.

This fixes the following scenario:
New session, import an file, delete the created track,
clean up unused sources (delete unused playlists)[, quit].

A reference to the imported region was kept, because of the
playlist's undo command (insert region). Yet the source file
was deleted.


PS. Most playlist changes are accompanied by GUI zoom/selection
MementoCommands. Those are currently never directly dropped.
command_death() leaves those in place.
2020-02-25 21:45:07 +01:00
aa3f7f2414
Remove undo function from global namespace 2020-02-25 20:09:47 +01:00
7532571fb2
NO-OP: whitespace 2020-02-25 17:55:51 +01:00
a886f2bfcb
Cleanup SourceList: remove unused copy/pasted region-list code 2020-02-25 16:17:00 +01:00
f158d2064d
NO-OP: whitespace 2020-02-25 16:17:00 +01:00