Commit Graph

30 Commits

Author SHA1 Message Date
Paul Davis b35518e212 switch from boost::{shared,weak}_ptr to std::{shared,weak}_ptr
This is mostly a simple lexical search+replace but the absence of operator< for
std::weak_ptr<T> leads to some complications, particularly with Evoral::Sequence
and ExportPortChannel.
2023-03-24 14:19:15 -06:00
Paul Davis 7bf89ce109 Constification: make Stateful::get_state() const, with all other required const-ness added (libs) 2022-04-06 21:56:59 -06:00
Robin Gareus e33d131174
Fix deadlock when creating VCAs
VCAManager::create_vca sets PI::order while holding the
VCAManager:lock mutex. PI order changes emit a "changed" signal
which in turn can result in querying a list of all strips
(reassign_track_numbers) which requires the VCA mutex:

See also 729ff35faf

```
#2  Glib::Threads::Mutex::Lock::Lock(Glib::Threads::Mutex&) (this=0x7fffffffb070, mutex=...) at /usr/include/glibmm-2.4/glibmm/threads.h:687
#3  ARDOUR::VCAManager::vcas[abi:cxx11]() const (this=0x5555599b6d10) at ../libs/ardour/vca_manager.cc:77
#4  ARDOUR::Session::get_stripables(std::__cxx11::list<boost::shared_ptr<ARDOUR::Stripable>, std::allocator<boost::shared_ptr<ARDOUR::Stripable> > >&, ARDOUR::PresentationInfo::Flag) const (this=0x55555bf03910, sl=std::__cxx11::list = {...}, fl=127) at ../libs/ardour/session.cc:3949
#5  ARDOUR::Session::ensure_stripable_sort_order() (this=0x55555bf03910) at ../libs/ardour/session.cc:2634
#6  ARDOUR::Session::notify_presentation_info_change(PBD::PropertyChange const&) (this=0x55555bf03910, what_changed=...) at ../libs/ardour/session.cc:7016
[ .. connect same thread ..]
#13 ARDOUR::PresentationInfo::send_static_change(PBD::PropertyChange const&) (what_changed=...) at ../libs/ardour/presentation_info.cc:113
#14 ARDOUR::PresentationInfo::set_order(unsigned int) (this=0x5555619ceca0, order=5) at ../libs/ardour/presentation_info.cc:288
#15 ARDOUR::Stripable::set_presentation_order(unsigned int) (this=0x5555619ce8a0, order=5) at ../libs/ardour/stripable.cc:55
#16 ARDOUR::VCAManager::create_vca(unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
    (this=0x5555599b6d10, howmany=1, name_template="VCA %n") at ../libs/ardour/vca_manager.cc:105
```
2022-03-03 17:43:37 +01:00
Robin Gareus a22f918d9d
Update libardour GPL boilerplate and (C) from git log 2019-08-03 15:53:16 +02:00
Robin Gareus 9a8464ff40
Add a signal to indicate VCA creation
As opposed to VCAAdded this is not emitted when re-loading a session
and only emitted when a user creates a new VCA.
2019-03-01 18:56:56 +01:00
Robin Gareus c656aaab3c VCA API-change: return created VCAs (handy for Lua scripts) 2018-03-15 20:25:27 +01:00
Robin Gareus be6abce398 Add Lua binding to un/assign VCAs 2017-08-18 22:00:24 +02:00
Robin Gareus d18a43422c Emit SelectionChange when VCA is removed
chicken/egg:
Stripable d'tor which calls remove_stripable_by_id() will only be called
when the Stripable is destroyed. But as long as the GUI selection holds a
shared-ptr reference to the Stripable, it won't be destroyed.
2017-08-06 22:17:05 +02:00
Robin Gareus 591d75f1d2 Fix stripable order for new strips & master-order 2017-06-17 04:37:05 +02:00
Tim Mayberry aede5c85d5 Use PBD::to_string from pbd/string_convert.h in ARDOUR::VCAManager
The numeric formatting is equivalent to iostreams when global C++ locale is set
to "C" without the need for a LocaleGuard.

I'm not sure this would have been an issue as the number of VCA's may never get
high enough for digit grouping of the locale to affect numeric output, but now
it is not a possibility.
2017-04-19 09:37:00 +10:00
Paul Davis cf52d6e4b4 enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.h 2016-07-14 14:45:23 -04:00
Paul Davis 965def3caf signed VCA numbers 2016-07-08 11:46:01 -04:00
Paul Davis 3b58010c8c mark session dirty on creation/deletion of a VCA 2016-06-02 14:46:35 -04:00
Paul Davis d98e47cf54 remove debug output 2016-05-31 15:30:44 -04:00
Paul Davis dc3ebc8eec use (possibly null) macros to mark VCAs for boost shared ptr debugging 2016-05-31 15:30:44 -04:00
Paul Davis 0ab10bf8e3 API and implementation tweaks for destroying VCAs 2016-05-31 15:30:42 -04:00
Paul Davis 1e9b2abe73 save and restore vca assignments 2016-05-31 15:30:41 -04:00
Paul Davis be4e898996 improve cleanup of VCA related objects 2016-05-31 15:30:41 -04:00
Paul Davis a89b3f5687 clear all solo state should affect VCAs too 2016-05-31 15:30:41 -04:00
Paul Davis 1f6800d421 redesign Route and VCA objects to inherit from ARDOUR::Stripable 2016-05-31 15:30:39 -04:00
Paul Davis 00b7385e4c correctly restore VCA-VCA slave/master relationships at session load time 2016-05-31 15:30:39 -04:00
Paul Davis aa80321976 fix deadlock caused by VCA=>VCA slaving and set_state() 2016-05-31 15:30:39 -04:00
Paul Davis dd31ef2d1b fix ambiguity in VCA constructors 2016-05-31 15:30:39 -04:00
Paul Davis 35172bb369 change API for GainControl, VCA and VCAManager
This allows sane state save/restore
2016-05-31 15:30:39 -04:00
Paul Davis f5df3c291e fix VCA name/number 2016-05-31 15:30:38 -04:00
Paul Davis 4d14ae4e23 mostly restore VCA state on session loading.
This does not restore VCA assignments
2016-05-31 15:30:38 -04:00
Paul Davis bfd0ba7bf3 add a bit of state to VCAManager 2016-05-31 15:30:38 -04:00
Paul Davis f44cac5cc6 expand and improve VCA API 2016-05-31 15:30:38 -04:00
Paul Davis 99d251de7d first pass at making the GUI for a VCA visible 2016-05-31 15:30:38 -04:00
Paul Davis ab9bb49f39 initial implementation of a VCA Manager object 2016-05-31 15:30:38 -04:00