Commit graph

1706 commits

Author SHA1 Message Date
Robin Gareus
34609232f0
Remove deprecated no-op function (1/2)
Glib::thread_init has been deprecated since 2.32,ib
is no longer necessary and no longer has any effect.

This fixes builds with modern glib[mm] versions, notably
with msys2 in Windows.
2025-11-20 23:10:52 +01:00
Robin Gareus
fc3b79dd58
Revert "glib version checks for MSYS"
This reverts commit bb6171bbb2.
2025-11-20 22:00:12 +01:00
Franke Burgarino
bb6171bbb2 glib version checks for MSYS 2025-11-20 13:38:18 -06:00
Robin Gareus
224e5ec163
When Ardour is running, there is at least 1 CPU core available 2025-11-12 02:22:26 +01:00
Paul Davis
f932e4bf15 UndoTransaction: do not delete a Command when handling its DropReferences signal 2025-11-11 13:01:50 -07:00
Paul Davis
decb945300 simpler assert 2025-11-11 13:01:50 -07:00
Paul Davis
751dea75d3 use drop_and_kill() when connecting Commands to their dependents 2025-11-11 13:01:50 -07:00
Paul Davis
210f58ddb7 add Destructible::drop_and_kill()
This should be used when a Destructible-derived object needs to be
deleted. Handlers of the DropReferences signal should not responsible for
deleting the Destructible, since that would happen in the middle of signal
emission.

Instead, emit the DropReferences signal, then delete the Destructible.
2025-11-11 13:01:50 -07:00
Paul Davis
a1d5294af5 use nullptr not zero 2025-11-11 13:01:50 -07:00
Robin Gareus
599d02bd2e
Amend previous commit, fix diff 2025-11-10 20:12:53 +01:00
Robin Gareus
8929147566
Another partial revert of 4998b114ea, fix mingw builds 2025-11-10 20:04:11 +01:00
Robin Gareus
57fc904004
Undo changes from 4998b114e that break existing MSVC build
This defines should be in common header file and wrapped
in an #ifndef clause
2025-11-10 16:00:48 +01:00
Robin Gareus
b3e4deb32f
Prefer std::regex over C regex_t 2025-11-09 21:27:26 +01:00
Robin Gareus
bf154d0239
AmEND 2025-11-09 20:55:42 +01:00
Robin Gareus
4998b114ea
First batch of change of waf/MSVC specific changes from EZ4Stephen 2025-11-09 20:51:56 +01:00
Robin Gareus
1ee5a68d76
Use consistent defines for header availability 2025-11-09 20:51:36 +01:00
Robin Gareus
8efc12c66a
Update file-utils include, add windows.h for CreateHardLinkA 2025-11-04 16:54:27 +01:00
Robin Gareus
78677b672c
Copy more mingw branches for MSVC 2025-10-22 18:48:40 +02:00
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
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