Commit Graph

534 Commits

Author SHA1 Message Date
Paul Davis
23794eca5b rename Controllable::WholeGroup => InverseGroup to reflect real intent.
Add logic to RouteGroupMember::use_group() to implement the real intent of InverseGroup
2016-01-22 11:58:31 -05:00
Paul Davis
9d65e6084c clean up functors used in cross-thread call_slot() messages, in case they contain shared_ptr<T>, which could result in a dangling reference 2016-01-16 09:33:31 -05:00
Paul Davis
2386410e4a remove debug output 2016-01-14 11:00:50 -05:00
Paul Davis
35807a1929 fully clean up request buffers when a thread dies 2016-01-14 10:53:32 -05:00
Paul Davis
077c65cc2a manually revert 4b3043cc and 141e6fb8181; add detailed explanatory comment 2016-01-14 09:05:06 -05:00
Paul Davis
141e6fb818 don't pick up already dead thread request buffers when setting up an event loop 2016-01-13 23:25:17 -05:00
Paul Davis
6d04a66eea more event loop debugging 2016-01-13 19:48:17 -05:00
Paul Davis
3e45254257 typo fix 2016-01-13 18:14:52 -05:00
Paul Davis
f3c9f5894a lots more DEBUG_TRACE statements for analysing malfunctioning system 2016-01-13 17:03:49 -05:00
Paul Davis
f1d0de029d remove debug output 2016-01-10 23:34:10 -05:00
Paul Davis
9e3299f97d change Controllable::set_value() API to include grouped control consideration.
This also removes Route::group_gain_control() and associated machinery.
Not yet tested with Mackie or other surfaces. More work to done to
start using the group capabilities, and also potentially to add
or derive more controls as RouteAutomationControls
2016-01-02 04:58:30 -05:00
Robin Gareus
80a730550d clang build fix (uint32_t is not declaed) 2015-12-29 18:49:56 +01:00
Robin Gareus
23333a271e fix windows/mingw builds 2015-12-29 10:30:27 +01:00
Paul Davis
0d9efc1148 redesign cross-thread registration/signalling system
This new design will work even when threads that need to receive
messages from RT threads are created *after* the RT threads. The
existing design would fail because the RT thread(s) would never
be known the later created threads, and so signals emitted by the
RT thread and causing call_slot() in the receiver would end up
being enqueued using a lock-protected list. The new design ensures
that communication always uses a lock-free FIFO instead
2015-12-28 10:14:17 -05:00
Robin Gareus
b48d87b3ea add API to query stateful ID override mode 2015-12-17 23:18:22 +01:00
Robin Gareus
6e13b91a35 portable pthread_self() debug message 2015-12-13 11:28:56 +01:00
Paul Davis
f32fc212f3 change AbstractUI implementation to use EventLoop::event_loop_name() and add extra DEBUG_TRACE statements to track thread registration with event loops 2015-12-12 11:12:10 -05:00
Paul Davis
a419fb5af0 fix endless-loop-at-shutdown bug now that abstract UI request buffers are used 2015-12-12 11:12:10 -05:00
Paul Davis
f369f33955 move BaseUI::_name into EventLoop; rename access method in EventLoop as event_loop_name() to clarify usage 2015-12-12 11:12:10 -05:00
Robin Gareus
162352419d NO-OP re-indent 2015-12-12 14:54:52 +01:00
Robin Gareus
6a1799f095 remove invalid free. - fixes crash with generic midi surface
if there is a per_thread_request_buffer,  get_request() simply puts a
POD RequestType on the ringbuffer's head.  send_request() increases
the write-pointer.  There is no memory to free.
2015-12-12 14:52:35 +01:00
Robin Gareus
c93f0b77bf rename ProcessSemaphore to Semaphore (libs) 2015-12-02 20:18:48 +01:00
Robin Gareus
15c958e32f consolidate semaphore implementation (part three) 2015-12-02 16:09:51 +01:00
Robin Gareus
003b632ed1 consolidate semaphore implementation (part one) 2015-12-02 16:03:28 +01:00
Robin Gareus
14d6470ad3 prefer pthread-semaphores (posix API) with mingw
Hopefully this resolves glitches on hyperthreading machines.
Apart from using unnamed Semaphores, pthread-w32 includes additional locks
(guess: mem-barriers), a fallback implementation and windows-specific
tricks that I'd rather not want to know about :)
2015-12-02 13:59:48 +01:00
Tim Mayberry
7f3118c8fe Don't indent inside namespace declaration to be consistent with ardour style 2015-12-01 14:22:38 +10:00
Tim Mayberry
e025415516 Use PBD::demangle_symbol in PBD::demangled_name<T> to reduce code duplication 2015-12-01 14:22:38 +10:00
Tim Mayberry
36fa670309 Rename PBD::symbol_demangle and some variable names to improve readability
Rename PBD::symbol_demangle to demangle_symbol so the transitive verb is
infront of the object.

Rename some local variables and fix documentation.
2015-12-01 14:22:38 +10:00
Tim Mayberry
5f4f89fb39 Move PBD symbol demangle functions into pbd/demangle.h/cc
Add pbd/demangle.cc source file and move functions from pbd/stacktrace.cc into
it
2015-12-01 14:22:38 +10:00
Paul Davis
92fe47bdee provide a mechanism to force ID regeneration/reset in PBD::Stateful when settingthe ID object from XML or string sources 2015-11-12 10:24:41 -05:00
Tim Mayberry
9e4dc284ee Replace spaces with tabs in pbd/stateful.h 2015-11-10 23:14:16 +10:00
Robin Gareus
7abfe85498 add API to suspend timers signal emission. 2015-10-30 15:55:26 +01:00
Tim Mayberry
3bd928591b Add PBD::Searchpath::contains method to check if a Searchpath contains a path 2015-10-22 11:51:03 -04:00
Tim Mayberry
c07ea1bc73 Expose protected PBD::Searchpath API
I prefer to use these as they are more explicit than using the overloaded
operators.
2015-10-22 11:51:03 -04:00
Paul Davis
6ca3a1593e add commentary and clean up blank lines 2015-10-21 22:31:35 -04:00
Paul Davis
ea95bef27b variable name change: percent is 0..100, 0..1.0 is a fraction 2015-10-21 08:09:40 -04:00
Paul Davis
6e7ca06f63 ensure that mutator function for CONFIG_VARIABLE_SPECIAL is used when assigning initial value during construction 2015-10-21 07:53:26 -04:00
Robin Gareus
22b07e0233 NOOP, remove trailing tabs/whitespace. 2015-10-05 16:17:49 +02:00
Paul Davis
4dc63966f0 globally remove all trailing whitespace from ardour code base.
Paul Davis was responsible for introducing almost all of this.
2015-10-04 14:51:05 -04:00
Robin Gareus
e344d379d2 update semantics of PBD::remove_directory()
Remove the directory recursively including itself. The function
is used in two places only:

* LV2Plugin::add_state() -- no change, remove tmp. state
* Session::save_as()  -- on error, remove target

In both cases removing the folder itself is correct.
2015-09-27 12:44:54 +02:00
John Emmas
d609217c55 Make sure that those recently moved functions will be visible if they're needed outside of libpbd 2015-09-18 10:27:27 +01:00
Paul Davis
c1d6a2fd92 add string_compose argument specializations so that empty std::string and empty C strings are handled as intended 2015-09-17 17:16:23 -04:00
Robin Gareus
95b55c7346 fix g_lstat() 2015-09-17 15:01:26 +02:00
Robin Gareus
c90bab4d4e add glib/stdio compat wrapper for mingw64-w32 2015-09-17 14:36:47 +02:00
Tim Mayberry
119e56e7eb Add PBD::QPC::initialize to initialize timer and call it from PBD::init
Check timer for invalid frequency
Precalculate timer tick rate to save a few instructions
Don't use static variables inside functions to avoid checking for initialization
Use static functions inside anonymous namespace for internal linkage
2015-09-16 23:59:38 +10:00
Tim Mayberry
091c4ed3a7 Move Windows MMCSS related utility functions into libpbd 2015-09-16 11:22:16 +10:00
Tim Mayberry
76a0c823ca Add PBD::DebugBit for debugging thread related debugging output 2015-09-16 11:22:16 +10:00
Tim Mayberry
f4cb4e479d Rename PBD::QPC::get_timer_valid to check_timer_valid and perform timer test
I'm not sure if this test is going to be effective as I don't have hardware to
test on at the moment. As noted in the documentation, Windows XP should be the
only OS where QPC uses a timer source that is non-monotonic(multi-core with
non-syncronized TSC).
2015-09-16 11:22:16 +10:00
Tim Mayberry
a88b2da6a9 Fix PBD::MMTIMER::reset_resolution and add some documentation
timeEndPeriod must be called with the same timer resolution value used in
timeBeginPeriod. When the process exits the timer resolution is restored anyway
so this is not very important.
2015-09-16 11:22:16 +10:00
Tim Mayberry
3f5c01e4eb Move Windows timer utility functions from PA backend into libpbd 2015-09-16 11:22:16 +10:00