Commit Graph

677 Commits

Author SHA1 Message Date
Robin Gareus
e4f18c1771 NO-OP: whitespace & revert samples -> [stack]frames 2019-04-08 00:35:00 +02:00
Robin Gareus
854de91fb0 Fix mingw compile (declare int64_t and int32_t) 2019-03-26 15:35:36 +01:00
Robin Gareus
da114c5a4d Remove static Destroyed(*), prefer StatefulDestructable API
This also add a debug-dump method to show remaining registered
Controllables.
2019-03-23 16:15:23 +01:00
Robin Gareus
087fd57d37 Re-add Controllable registry
To facilitate a central registry with weak/shared pointer lookup,
  enable_shared_from_this<ARDOUR::AutomationControl>
was migrated to
  enable_shared_from_this<PBD::Controllable>

The main (and only) user is generic-midi surface's state interface :(
2019-03-23 04:23:43 +01:00
Robin Gareus
16fe286ed9 Use weak-pointer for Controllable learning 2019-03-23 01:50:45 +01:00
Robin Gareus
1dedadd03f Remove c-pointer Controllable* registry 2019-03-23 01:42:03 +01:00
Robin Gareus
9a1c22d7e1 Remove unusued API Create/Delete Binding 2019-03-23 01:28:23 +01:00
Paul Davis
b53d80a7d4 make PlaybackBuffer<T>'s power-of-two size computation available to others 2019-03-18 07:39:23 -07:00
Robin Gareus
e1ffe7857f Use enum for exec stderr parameter (1/2) 2019-03-05 22:49:15 +01:00
Robin Gareus
7ae1825a3c Remove cruft, unused files 2019-02-28 18:04:42 +01:00
Robin Gareus
c6e2e0a948 Clean up remnants from a half eaten apple 2019-02-28 18:00:08 +01:00
Robin Gareus
35609bcfed Fix some signed/unsigned warnings 2019-02-16 01:10:50 +01:00
Robin Gareus
865a33f7b9 Properly initialize atomic variable 2019-02-08 19:33:23 +01:00
Robin Gareus
3c96ba1de6 Allow reading future data without read-commit
This is in preparation for de-click, fade-out. A disk-reader
can keep going, reading buffered data (if any) without changing the
read-index.
2019-02-07 01:31:15 +01:00
Robin Gareus
6975b5ca54 Prepare buffer for seeking
Keep track of safe reservation:
Data has been read (or was skipped) previously can be read again
up to the allocated "reservation" (which is never overwritten).
2019-02-06 19:00:15 +01:00
Robin Gareus
b3fda6236a Optimize buffer zero-filling 2019-02-06 17:02:20 +01:00
Robin Gareus
007c4ffdc0 Towards a new disk-reader ringbuffer
This is mainly a NO-OP, introducing a new PlaybackBuffer type
and preparing for its use.

At this point in time, the buffer is just a power-of-two sized
ringbuffer and the disk-reader's read-logic is still unchanged.

Eventually the read and write sample position that are currently
private to the disk-reader can be migrated to be owned by the buffer.
Also Diskreader::read() positions can be matched to read-position ..
+/- buffer reservation and de-click can read w/o committing the read.
2019-02-05 23:29:31 +01:00
Robin Gareus
bf728520ca Optimize exponential interpolation. 2019-01-19 12:08:54 +01:00
Robin Gareus
1759d1c9c9 Fix a tiny memory-leak when calling vfork 2018-11-29 02:06:42 +01:00
Robin Gareus
d169864b5b Prepare session-metadata export to external command 2018-11-20 23:56:12 +01:00
Robin Gareus
103ef2ba08 Add API to write raw data to child processes. 2018-11-19 02:26:43 +01:00
Robin Gareus
78a3683233 Consolidate relative sched_get_priority computation 2018-10-11 15:29:50 +02:00
John Emmas
07466440c4 Move a couple of #undef's
'pbd/timing.h' now includes a call to 'std::numeric_limits<>::max()'
2018-05-19 09:28:30 +01:00
Robin Gareus
3534035091 Add a time-profiler with statistics 2018-05-17 22:15:07 +02:00
Robin Gareus
c0dbe8eaaf Move coreaudio_set_realtime_policy into libpbd 2017-10-30 16:31:38 +01:00
Robin Gareus
1aa96dc0a1 Add a RAII SpinLock (using boost's spinlock) 2017-10-26 22:33:46 +02:00
Robin Gareus
5c6e2b5802 Fix g_stat() for 64bit windows/mingw64 2017-10-18 17:54:39 +02:00
Robin Gareus
df83c0381e Prepare support for compression levels (archive + flac) 2017-10-03 02:22:42 +02:00
Paul Davis
30b087ab3d globally change all use of "frame" to refer to audio into "sample".
Generated by tools/f2s. Some hand-editing will be required in a few places to fix up comments related to timecode
and video in order to keep the legible
2017-09-18 12:39:17 -04:00
Robin Gareus
dc83dc7b58 Add TouchChanged signal (and re-indent) 2017-09-18 11:40:52 -04:00
Robin Gareus
7258c6334d Namespace PBD::RingBuffer
class RingBuffer<> is a very generic name and should not pollute the
global namespace.
2017-09-16 16:37:29 +02:00
Ben Loftis
7d88091229 Avoid assert() when loading xml: Throw an XMLerror if attribute_value fails. 2017-08-30 10:23:34 -05:00
Robin Gareus
467c801ce8 Abstract definition of rt-scheduler policy
pthread-w32 does not support pthread_setschedparam() with
SCHED_FIFO and bails out. While pthread_create() simply ignores the policy
and sets the priority regadless.

This only affects ctrl-surface event-loops & AutomationWatch on Windows.
2017-08-29 20:35:36 +02:00
Robin Gareus
229c9584bf Add a PBD API to set pthread priority 2017-08-29 17:25:23 +02:00
Robin Gareus
8374e23014 Add API to set thread-priority (for ctrl-surfaces) 2017-08-05 01:28:11 +02:00
Robin Gareus
ea48c56061 NO-OP: name-change (_list and _lock are also used in other places)
Derived classes need to explicitly specify namespace and class
to avoid ambiguities (even for private members)
2017-07-30 02:42:55 +02:00
Robin Gareus
bde3edf1c8 Make start_touch() truly idempotent
Also don't allow outsiders to call Controllable::set_touching()
2017-07-25 20:15:12 +02:00
Robin Gareus
6f986173f3 Controllable focus notification API
This allows to inform control-surfaces about the current GUI
control-element. "Link" control-surface interaction to GUI focus.
2017-07-02 18:19:13 +02:00
Paul Davis
940be0cbb9 compilation requires <stdint.h> 2017-06-21 14:19:21 -04:00
Robin Gareus
ce059e2d66 Remove internal_to_user/user_to_internal API
Also GainControl can just use the AutomationControl's implementation of
get_user_string()
2017-06-21 18:13:46 +02:00
Robin Gareus
e91b80eb85 Centralize control-parameter math functions in libpbd.
Functions formerly in ardour/util.h and some more functions.
The main motivation is libevoral which can use libpbd but not libardour.

The eventual goal is to consolidate various different interpolation,
scaling and deflection methods.
2017-06-21 18:12:01 +02:00
Robin Gareus
333e20a3a6 VCA/SlavableAutomationCtrl re-design:
* remember master-ctrl value on assignment & save with session
* Control/AutomationCtrl only stores ctrl's own value (w/o master)
* virtual AutomationControl::get_value () -> use SlavableAC method
* MasterRecord uses weak-ptr (fixes recursive ~Controllable() deadlock)
2017-06-12 02:26:23 +02:00
Robin Gareus
628e60f8fd NO-OP: whitespace 2017-05-29 23:45:16 +02:00
Daniel Sheeler
d67436af3b duplicate routes start off unsoloed to avoid issues related to upstream / downstream buses 2017-05-29 15:42:27 -05:00
Robin Gareus
5d683eaeca NO-OP: whitespace and FSF address 2017-05-06 15:11:53 +02:00
Paul Davis
ccd19ed061 extend PBD::ID API to allow construction and operator== using uint64_t
This is theoretically dangerous, because a PBD::ID is supposed to be unique, and this new constructor
cannot guarantee that. However, the same danger already exists with the std::string-based constructor
2017-05-05 18:56:25 +01:00
Robin Gareus
9c0ba3b3d5 Add mechanism to reset/lock semaphores 2017-04-22 23:06:22 +02:00
Tim Mayberry
d19ec8ba46 Use hyphen for XML property names
These have been normalized/modified by the XMLProperty ctor for many years (~9)
so special treatment when reading properties should not be needed.
2017-04-21 12:46:04 +10:00
Tim Mayberry
1ce58ad90a Add additional PBD::string_to/to_string specializations for PBD::ID 2017-04-19 09:37:02 +10:00
Tim Mayberry
4367b51e56 Remove PBD::to_string() function from pbd/convert.h
All uses of this function have now been replaced by PBD::to_string() from
pbd/string_convert.h

Remove this function so that it isn't mistakenly used to perform numeric to
string conversion when the result is being used for serialization as that only
works if the global C++ locale is set with LC_NUMERIC=C, which is the case
currently but may not be in the future.
2017-04-19 09:37:01 +10:00