Robin Gareus
52bd416845
Only save modified configuration variable to user config
...
This allows to change default values when necessary.
2025-09-11 23:30:22 +02:00
Robin Gareus
a6e3708a8a
NO-OP: format comment
2025-08-23 21:46:35 +02:00
Robin Gareus
bdc4d6fb60
Potential fix for MSVC builds
2025-08-17 17:30:22 +02:00
Robin Gareus
92bcddb437
Emit Signal when MCSS Threads are exhausted
...
By default Windows has limit of 32 MMCSS threads.
Ardour uses MMCSS scheduling for for hardware I/O (audio and MIDI)
as well as for realtime process threads, and a user on a
recent machine may run into this limit.
2025-08-16 23:11:16 +02:00
Robin Gareus
5ffc3aa28b
Use PBD namespace for free CPU functions
...
Ideally never put methods in the global namespace
to prevent potential conflicts.
2025-08-15 22:10:31 +02:00
Robin Gareus
b1d5f065db
Add API to query max MMCSS threads on Windows
...
By default Windows limits the number of MMCSS threads to 32.
This can cause problems on modern systems with >= 32 cores,
when Ardour uses many process and I/O threads.
So far this is just a first step (query API)
2025-08-15 22:02:44 +02:00
John Emmas
b795d36cd3
Avoid using 'boost::aligned_storage' which is known to be problematic in MSVC builds
...
MS initially believed the runtime issues might be fixable in VS2015 but in fact, Boost's alignment strategy and Microsoft's alignment strategy just turned out to be incompatible:-
https://www.boost.org/doc/libs/1_65_0/libs/type_traits/doc/html/boost_typetraits/reference/aligned_storage.html
2025-06-17 09:02:24 +01:00
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
Paul Davis
1c0882ba56
PBD::Signal: do not use a StackAllocator for signals with return values
2025-05-09 14:21:05 -06: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
John Emmas
d285ff365e
Add a visibility specifier that's now needed
...
Following the introduction of 'Pianoroll::region_prop_change()' (commit #29833d75c92) 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
Paul Davis
71f93d3c12
provide a stacktrace function callable directly from C (libpbd_c_stacktrace())
2025-02-11 10:23:01 -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
32ff87f7f6
Replace boost::aligned_storage with alignas std::array
2024-11-17 18:43:08 +01: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
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
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
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
Robin Gareus
ed437afda7
Fix thread priorities for Windows builds
2024-09-30 19:07:53 +02:00
Robin Gareus
395833e4f8
Always use PBD API for thread priorities
2024-09-28 03:58:48 +02:00
Robin Gareus
e8445d13ec
Require thread name to be passed to PBD::Thread and store thread
2024-09-28 03:16:30 +02:00
Robin Gareus
8d3ebde60e
Distinguish Threads and ThreadName debugging
...
This also allows for -DThread to enable both.
We celebrate the 128th debug bit and look forward to
the next 64!
2024-09-28 03:15:36 +02:00
Alejandro Domínguez
867eaa0b13
Remove unused libs/pbd/pbd/stl_functors.h
2024-09-01 19:17:10 +02:00
Robin Gareus
b50477e608
Exclude monitor gain from mixer scenes
2024-07-15 00:43:51 +02:00
Robin Gareus
5b9e4fff63
Parallelize Disk I/O and RegionFx processing
2024-04-30 03:46:39 +02:00
Robin Gareus
44610c7877
Fix RCU race condition (see source for details)
2024-04-12 00:26:51 +02:00
Robin Gareus
2fe22eeab5
Fix header include, potential fix for #9649
2024-02-29 03:09:00 +01:00