Commit graph

1293 commits

Author SHA1 Message Date
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
28f211c5d2
NO-OP: whitespace 2019-01-23 12:59:17 +01:00
Robin Gareus
87602e7fb3
system-exec read: allow 1 byte for null termination -- #7715 2019-01-23 12:44:10 +01:00
Robin Gareus
bf728520ca
Optimize exponential interpolation. 2019-01-19 12:08:54 +01:00
Paul Davis
55bc0eec91 adjustments for latest boost shared_ptr debug patch 2018-12-19 17:19:51 -05: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
d18b247a05 Fix Windows and Mac Builds
* missing include for locale_to_utf8 (amend 4c6ff5f7e7)
* avoid void* arithemtic (amend 103ef2ba)
2018-11-19 12:54:07 +01:00
Robin Gareus
103ef2ba08 Add API to write raw data to child processes. 2018-11-19 02:26:43 +01:00
Robin Gareus
7c3fd2fe79 Glib throws a const FileError exception 2018-10-26 13:40:03 +02:00
Paul Davis
8ed33f1bc7 remove use of hardcoded -fPIC compiler flag, and use compiler flag dict instead 2018-10-14 22:06:11 -04:00
Robin Gareus
78a3683233 Consolidate relative sched_get_priority computation 2018-10-11 15:29:50 +02:00
John Emmas
9506a294c7 Adapt our remaining MSVC projects for 'boost::atomic' (in case it later gets extended to the other libs)
Stage 1 of 3 (more to follow)
2018-09-30 08:56:12 +01:00
Robin Gareus
497a3fbaa1 Fix --no-nls (2/5), prefer #if in libs
This is for consistency with system-wide gettext.h which is used
by some 3rd party libs. system-wide gettext uses `#if ENABLE_NLS`,
not #ifdef
2018-09-21 19:03:33 +02:00
John Emmas
79f01bc889 Initial changes needed for building Mixbus (with MSVC) as version 5
(Mixbus itself will probably need extra changes)
2018-09-10 07:14:59 +01:00
Paul Davis
fb4ff01a18 better debug message with correct namespace for EventLoop::invalidate_request() 2018-08-07 10:44:56 -04: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
John Emmas
b9c9777b9a When building with MSVC, allow for the fact that Mixbus and Ardour can be using different versions of the SESSION_FILE format 2018-02-15 09:03:32 +00:00
Robin Gareus
3856d525fb Fix "open folder" for non-ASCII paths on Windows 2017-11-27 00:42:55 +01:00
Robin Gareus
c0dbe8eaaf Move coreaudio_set_realtime_policy into libpbd 2017-10-30 16:31:38 +01:00
John Emmas
6e017eff22 Accommodate newly added/removed source(s) in our MSVC project (libpbd) 2017-10-27 13:08:32 +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
John Emmas
bcdb3aec3a Check in a few MSVC projects to accommodate the change from libtimecode to libtemporal
This is mostly to see if there'll be any problems when merging these changes into Mixbus. I'm guessing there'll be some conflicts in these projects (and a lot more to follow...)
2017-09-28 12:27:56 +01:00
Robin Gareus
506a29e2d3 Don't recurse into MacVST bundle-folders during plugin-scan 2017-09-21 20:02:11 +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
cec84d242d NO-OP: whitespace 2017-08-04 16:26:37 +02:00
Robin Gareus
1ed9564ffd Graph profiling: allow to override max DSP thread count & calc avg. 2017-08-04 16:26:26 +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
ddf55c0d88 PBD::init() failing is fatal in main(), don't silently exit. 2017-07-03 14:45:41 +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
John Emmas
6180c5a5fc Accommodate newly introduced source(s) in our MSVC project (libpbd) 2017-06-22 17:59:16 +01:00
Tim Mayberry
6ab970efa3 Remove LocaleGuard from PBD::Controllable state methods
These are no longer necessary as float <=> string conversion is handled by
locale independent PBD::to_string/string_to via XMLNode::get/set_property
2017-06-22 10:48:38 +10: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
Tim Mayberry
1f094027c5 Remove normalization of property names from libpbd xml code
It may have been OK to add this code temporarily at this low level, but as it
was introduced in 2008, this change is made with the assumption that any
Sessions that were affected have been re-saved since then with corrected
property names and that "normalization" is no longer necessary.

Timing results before changes:

XMLTest::testPerfMediumXMLDocumentTiming
   Create : Count: 10 Min: 30375 Max: 48253 Total: 431727 Avg: 43172 (43 msecs)
   Write : Count: 10 Min: 42553 Max: 49163 Total: 453353 Avg: 45335 (45 msecs)
   Read : Count: 10 Min: 70307 Max: 75987 Total: 734923 Avg: 73492 (73 msecs)
XMLTest::testPerfLargeXMLDocumentTiming
   Create : Count: 10 Min: 154486 Max: 307856 Total: 2678989 Avg: 267898 (267 msecs)
   Write : Count: 10 Min: 304273 Max: 343274 Total: 3169158 Avg: 316915 (316 msecs)
   Read : Count: 10 Min: 496920 Max: 541394 Total: 5260410 Avg: 526041 (526 msecs)

Timing results after changes:

XMLTest::testPerfMediumXMLDocumentTiming
   Create : Count: 10 Min: 21437 Max: 39749 Total: 348622 Avg: 34862 (34 msecs)
   Write : Count: 10 Min: 42320 Max: 49989 Total: 446135 Avg: 44613 (44 msecs)
   Read : Count: 10 Min: 63252 Max: 68389 Total: 660841 Avg: 66084 (66 msecs)
XMLTest::testPerfLargeXMLDocumentTiming
   Create : Count: 10 Min: 113458 Max: 263225 Total: 2215595 Avg: 221559 (221 msecs)
   Write : Count: 10 Min: 305439 Max: 339986 Total: 3150697 Avg: 315069 (315 msecs)
   Read : Count: 10 Min: 447560 Max: 488121 Total: 4698903 Avg: 469890 (469 msecs)
2017-05-26 08:48:04 +10:00