Commit graph

1681 commits

Author SHA1 Message Date
Robin Gareus
0803cac946
Fix optimized builds 2025-06-07 01:53:33 +02:00
Paul Davis
cc435bcd0f make connection/emission debugging of PBD::Signal more useful/informative 2025-06-06 09:07:45 -06:00
Robin Gareus
b92fa1d0e4
Use PBD::CCurl for libardour HTTP/S requests 2025-05-20 00:03:21 +02:00
Robin Gareus
4f300b5474
Migrate SSL-cert setup to libpbd, so the downloader can use it 2025-05-20 00:03:21 +02:00
Robin Gareus
d537cdf60b
Fix windows build (see also e44a66287a) 2025-05-19 18:39:13 +02:00
Robin Gareus
e44a66287a
Correctly detect localtime_r 2025-05-18 20:08:27 +02:00
Robin Gareus
6c8a2ec05b
Fix false read-only detection of sessions on Windows with OneDrive
see https://discourse.ardour.org/t/ardour-8-4-on-win11-amd64-always-opens-session-in-read-only-mode/110063/38?u=x42
2025-05-14 20:21:44 +02:00
Paul Davis
1c0882ba56 PBD::Signal: do not use a StackAllocator for signals with return values 2025-05-09 14:21:05 -06:00
Nils Philippsen
3c63a81c1c
Don’t install test programs
Signed-off-by: Nils Philippsen <nils@tiptoe.de>
2025-05-06 23:42:07 +02:00
Paul Davis
2a7bef47fa return immediately in a non-void Signal if there are no handlers
This allows r.begin(() to not refer to undefined memory
2025-05-05 21:51:23 -06:00
Paul Davis
cf84ed0041 use a std::vector to collect signal handler return values, not std::list 2025-05-04 19:21:50 -06:00
Robin Gareus
e3860844a6 Improve StackAllocator debug messages 2025-05-04 23:41:22 +02:00
Paul Davis
02aeb3895f NO-OP: newline/whitespace/brace 2025-04-24 12:07:19 -06:00
John Emmas
d285ff365e Add a visibility specifier that's now needed
Following the introduction of 'Pianoroll::region_prop_change()' (commit #29833d75c9) the operator<< (for PBD::PropertyChange) now needs to be visible outside of libpbd
2025-04-19 13:33:36 +01:00
Paul Davis
ebda6bf0c5 rework PBD::Signal emission code to avoid memory allocation
We now use a stack allocator when making a copy of current connection state at
the start of the signal emission process, and when collecting results from
signal handlers in the case of a non-void return type.

These changes also include a functionally neutral reworking of how the connection
state copy is made and then used to check that a connection/handler is still
valid mid-emission.

Heap allocation will still happen if a signal has more than (currently) 512
connections. A little experimentation reveals that the maximum number of
connections is typically nroutes+1, so 512 seems like a reasonable choice
for this.
2025-04-16 09:09:57 -06:00
Paul Davis
f66f81546d fix several warnings from PBD::Signal due to a missing return call for some types 2025-04-15 22:34:49 -06:00
Paul Davis
a46f2cefb4 PBD::Signal - move connection list back into private scope (amend 86c837b0e) 2025-04-14 10:45:46 -06:00
Paul Davis
86c837b0eb provide deeper debugging of PBD::Signal emission process 2025-04-14 10:10:57 -06:00
Robin Gareus
db16c8818c
Add debug messages to investigate Windows/OneDrive read-only sessions 2025-04-05 18:23:28 +02:00
Paul Davis
71f93d3c12 provide a stacktrace function callable directly from C (libpbd_c_stacktrace()) 2025-02-11 10:23:01 -07:00
Paul Davis
809d605a4a improve stacktraces on macOS involving Objective C 2025-02-11 10:23:00 -07:00
Robin Gareus
728e0c0144
Build fixes for NetBSD from pkgsrc (#9886) 2025-02-01 11:25:42 +01:00
Paul Davis
456a8bcabf autofication of some loops in Stateful::apply_changes() and avoidance of a loop in non-debug builds 2025-01-29 17:40:57 -07:00
Robin Gareus
4a99026cc9
Revert "Replace boost::aligned_storage with alignas std::array"
This reverts commit 32ff87f7f6.

This causes issues on macOS/clang
```
../libs/pbd/pbd/stack_allocator.h:152:53: note: destructor of 'StackAllocator<std::__tree_node<std::__value_type<ARDOUR::DataType, std::map<unsigned int, unsigned int, std::less<unsigned int>, PBD::StackAllocator<std::pair<const unsigned int, unsigned int>, 16>>>, void *>, 2>' is implicitly deleted because field '_buf' has a deleted destructor
  152 |         alignas(16) std::array<value_type, stack_capacity> _buf;
```
2024-11-19 18:03:23 +01:00
Alejandro Domínguez
fa57d5ed86
Disambiguate std and boost placeholder 2024-11-17 20:20:23 +01:00
Alejandro Domínguez
32ff87f7f6
Replace boost::aligned_storage with alignas std::array 2024-11-17 18:43:08 +01:00
Paul Davis
b8e1f67b75 C++ demangnling: make it work on macOS as well as linux 2024-11-10 22:07:58 -07:00
Mads Kiilerich
b4ff4f356c Make header files more self-contained - add missing Ardour and lib includes 2024-10-20 03:30:46 +02:00
Mads Kiilerich
8a5f21d8e3 Drop some unused files - avoid trying to maintain stuff that can't be tested 2024-10-20 03:11:53 +02:00
Mads Kiilerich
140670541f Use .inc.h for #include files that not are plain headers
Regular .h files *should* be self-contained and independent of previous
includes and guarded to only include once. Make it clear which files
that *doesn't* apply for at all.
2024-10-20 03:11:53 +02:00
Robin Gareus
0d71876189
signals_generated.h is no longer required 2024-10-19 21:54:34 +02:00
Robin Gareus
74c4ca3e52
Reduce reliance on boost - the hard part
the rest from `tools/convert_boost.sh`.

* replace boost::function, boost::bind with std::function and std::bind.

This required some manual fixes, notably std::placeholders,
some static_casts<>, and boost::function::clear -> = {}.
2024-10-19 03:47:21 +02:00
Robin Gareus
ff95d81612
Reduce reliance on boost - the easy part
* boost::unordered_map -> std::unordered_map
* BOOST_STATIC_ASSERT/static_assert
* BOOST_FOREACH -> for
* boost::tuple -> std::tuple/g
* boost::math::isnormal -> std::isnormal
* boost::container::set -> std::set
* boost::none -> std::nullopt
* boost::optional -> std::optional
2024-10-19 03:41:16 +02:00
Alejandro Domínguez
2436b4df06
Replace boost::noncopyable with C++11 deleted copy constructors 2024-10-19 01:04:15 +02:00
Alejandro Domínguez
1ffb70f670
Replace boost::scoped_ptr with std::unique_ptr (1/2) 2024-10-19 01:04:14 +02:00
Robin Gareus
bd8525e5f1
Remove deprecated PBD::SignalN 2024-10-18 20:46:31 +02:00
Robin Gareus
2d7cce44f1
Replace PBD::Signals (1/2) 2024-10-18 20:41:08 +02:00
Alejandro Domínguez
0ade0b2212
Deduplicate SignalWithCombiner<Combiner, void, A...> specialization 2024-10-18 20:41:08 +02:00
Alejandro Domínguez
16dd8528c8
Make SignalN template variadic 2024-10-18 20:41:05 +02:00
Paul Davis
75f56cd3e1 the great onceification (libs)
Replace use of #ifndef header guards with #pragma once

Modern C++, baby!
2024-10-17 07:44:31 -06:00
Paul Davis
7901b4119f we're gonna need a bigger debug set 2024-10-17 07:44:31 -06:00
Paul Davis
911ad78c06 add API to access PBD::UndoHistory member of HistoryOwner 2024-10-17 07:44:31 -06:00
Paul Davis
8c086693af show HistoryOwner::_name in DEBUG_TRACE messages 2024-10-17 07:44:31 -06:00
Paul Davis
d30c8a1286 abstract concept of a history owner from ARDOUR::Session into libpbd 2024-10-17 07:44:31 -06:00
Paul Davis
7799adc8db make Stateful a virtual base class of StatefulDestructible
This permits dual inheritance from Stateful.
2024-10-17 07:44:29 -06:00
Robin Gareus
8115578d4e
Add RT thread priority debugging 2024-10-14 21:49:56 +02:00
John Emmas
fd8808d7b8 Minor declaration issue that upsets MSVC/c++17 2024-10-13 11:39:48 +01:00
Robin Gareus
0aff098541
Fix IO Thread priority
This adds `pbd_pthread_priority` indirection to correctly get
the absolute thread priority.

and for consistency a 4 letter enum is used.
2024-10-11 10:06:49 +02:00
John Emmas
07c79ce92c Small changes to make pthread_utils.cc buildable again with MSVC 2024-10-01 20:28:16 +01:00
Robin Gareus
dab22a7c70
Explicitly set Windows Process Scheduling Class 2024-09-30 19:57:53 +02:00