13
0
Commit Graph

1284 Commits

Author SHA1 Message Date
518c31eeb7 skip dead threads (if the event remains, it'll be cleaned up below) 2016-12-14 17:48:44 +01:00
036390f4c2 fix potential invalid lock 2016-12-14 17:31:31 +01:00
7a1ff7ce8f rework locking (fa07233a, 112fba182)
For now: use a single lock, which should fix all related crashes.
optimize (with less contended partial locks) if this works.
2016-12-14 13:43:20 +01:00
dd525d1613 release locks before deleting record 2016-12-14 02:25:13 +01:00
112fba182f amend prev commit 2016-12-14 00:51:40 +01:00
fa07233a17 mutex 'er up
Some overzealous locking to track down RequestObject related crashes.

bc0fa4d689 wrongly locked the current event loop's
request_invalidation_lock instead of the invalidation's list lock.

Also Abstract UI is able to delete requests concurrently with with
EventLoop invalidation.
e.g. PortManager::PortRegisteredOrUnregistered  and GlobalPortMatrixWindow
so the lock needs to be exposed.

If this solves various issues, mutexes should to be consolidated
(request_buffer_map_lock + request_invalidation_lock) and be chosen
such that there is as little contention as possible.
2016-12-13 23:47:07 +01:00
61693a318a Add LIBPBD_API to a function declaration
The new specialisation for ConfigVariable<float>::set_from_string() needs to be exportable (it gets used somehow by ARDOUR::SessionConfiguration).

If adding LIBPBD_API causes a problem for gcc, we could change it to LIBPBD_TEMPLATE_MEMBER_API
2016-12-08 17:29:49 +00:00
975f959adb For building with MSVC, std::strtof() didn't get introduced until VS2013
(use std::strtod() in earlier versions)
2016-12-08 13:57:23 +00:00
f521bdb9dc Fix another crash at exit. 2016-12-07 01:58:58 +01:00
7b1f97bffa fix parsing "-inf" in config variables
The default for export-silence-threshold is -INFINITY, written
as "-inf" (by cfgtool) into system_config. Yet parsing the config using
a std::stringstream results in "0" (due to bugs in various libc++).
2016-12-07 00:50:00 +01:00
b51321bd7d Make libpbd and evoral capable of standalone build
Just an update to slightly rotten wscripts, shouldn't be any changes during an
ardour build.  Motivation being a short development cycle for working on evoral
and/or its test suite.
2016-12-04 15:15:11 -05:00
bc0fa4d689 Fix mysterious crashes such as #7049
Fixes an issue with corrupted std::lists<> due to concurrent writes
to the invalidation list which eventually resulted in
EventLoop::invalidate_request() not invalidating requests.
Concurrency sucks rocks hard.
2016-11-24 09:02:47 +01:00
ed7b6fee0c Remove the MSVC 'poll()' emulation now that Ardour's stopped using poll() 2016-11-18 18:19:08 +00:00
cd5a319e48 fix mingw64 debug build 2016-11-17 12:58:28 +01:00
ed09a68f24 Fix for conflicting definition of _xgetbv with mingw-w64 >= 5
Simplify the #ifdef logic so it is easier to follow and add exceptions in the
future if necessary.
2016-11-10 15:23:43 +10:00
06700cb2f4 Allow to construct a XML tree from a text buffer 2016-10-29 19:57:43 +02:00
8519677a24 fix potentially crash-inducing race condition by removing event loops' x-thread channel from an event loop when it is destroyed 2016-10-17 14:48:15 -04:00
816f3bfb36 Use std::vector::reserve to improve performance of adding properties
The number of properties per node roughly corresponds to the number of members
of the class the node is representing and should be fairly low.

Use std::vector::reserve to prevent reallocation on insert for most node types,
there are exceptions like Region(~40 properties).

This seems worth it as part(maybe 1/10th of the total time) of saving a Session
is a combination of what occurs in "Create" and "Write" in this test.

Perf results before changes:

XMLTest::testPerfMediumXMLDocumentTiming
   Create : Count: 10 Min: 30610 Max: 42656 Total: 376672 Avg: 37667 (37 msecs)
   Write : Count: 10 Min: 42804 Max: 54277 Total: 460455 Avg: 46045 (46 msecs)
   Read : Count: 10 Min: 70364 Max: 85484 Total: 750909 Avg: 75090 (75 msecs)
XMLTest::testPerfLargeXMLDocumentTiming
   Create : Count: 10 Min: 164360 Max: 356995 Total: 3064482 Avg: 306448 (306 msecs)
   Write : Count: 10 Min: 308655 Max: 372953 Total: 3226707 Avg: 322670 (322 msecs)
   Read : Count: 10 Min: 517243 Max: 541839 Total: 5289950 Avg: 528995 (528 msecs)

Perf results after 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)
2016-10-10 08:45:34 +10:00
e84fbfe6e5 Remove PropertyMap from XMLNode class
It appears that there is no performance benefit from storing properties in a
map for faster lookup or it is counteracted by the penalty of storing and
maintaining the additional data structure.

Timing results before changes with an optimized build:

XMLTest::testPerfMediumXMLDocumentTiming
   Create : Count: 10 Min: 41293 Max: 63746 Total: 564448 Avg: 56444 (56 msecs)
   Write : Count: 10 Min: 42932 Max: 49221 Total: 453955 Avg: 45395 (45 msecs)
   Read : Count: 10 Min: 80160 Max: 84678 Total: 824506 Avg: 82450 (82 msecs)

XMLTest::testPerfLargeXMLDocumentTiming
   Create : Count: 10 Min: 228759 Max: 420236 Total: 3587597 Avg: 358759 (358 msecs)
   Write : Count: 10 Min: 307095 Max: 348767 Total: 3205704 Avg: 320570 (320 msecs)
   Read : Count: 10 Min: 572400 Max: 657219 Total: 5959630 Avg: 595963 (595 msecs)

Perf results after changes:

XMLTest::testPerfMediumXMLDocumentTiming
   Create : Count: 10 Min: 30610 Max: 42656 Total: 376672 Avg: 37667 (37 msecs)
   Write : Count: 10 Min: 42804 Max: 54277 Total: 460455 Avg: 46045 (46 msecs)
   Read : Count: 10 Min: 70364 Max: 85484 Total: 750909 Avg: 75090 (75 msecs)

XMLTest::testPerfLargeXMLDocumentTiming
   Create : Count: 10 Min: 164360 Max: 356995 Total: 3064482 Avg: 306448 (306 msecs)
   Write : Count: 10 Min: 308655 Max: 372953 Total: 3226707 Avg: 322670 (322 msecs)
   Read : Count: 10 Min: 517243 Max: 541839 Total: 5289950 Avg: 528995 (528 msecs)
2016-10-10 08:45:34 +10:00
97752e6a51 Use references rather than copying containers in libpbd xml code
It is slightly surprising but there seems to be little difference to
performance with these changes. Possibly a slight improvement in "Create" test
with a large xml document(~5%).

Timing results before these changes with an optimized build using new XML perf tests:

XMLTest::testPerfMediumXMLDocumentTiming
   Create : Count: 10 Min: 38656 Max: 63827 Total: 571228 Avg: 57122 (57 msecs)
   Write : Count: 10 Min: 43594 Max: 49279 Total: 459907 Avg: 45990 (45 msecs)
   Read : Count: 10 Min: 80247 Max: 84912 Total: 827207 Avg: 82720 (82 msecs)

XMLTest::testPerfLargeXMLDocumentTiming
   Create : Count: 10 Min: 230706 Max: 456054 Total: 3850998 Avg: 385099 (385 msecs)
   Write : Count: 10 Min: 312322 Max: 353789 Total: 3264211 Avg: 326421 (326 msecs)
   Read : Count: 10 Min: 573556 Max: 610865 Total: 5951908 Avg: 595190 (595 msecs)

Timing results after these changes:

XMLTest::testPerfMediumXMLDocumentTiming
   Create : Count: 10 Min: 41293 Max: 63746 Total: 564448 Avg: 56444 (56 msecs)
   Write : Count: 10 Min: 42932 Max: 49221 Total: 453955 Avg: 45395 (45 msecs)
   Read : Count: 10 Min: 80160 Max: 84678 Total: 824506 Avg: 82450 (82 msecs)

XMLTest::testPerfLargeXMLDocumentTiming
   Create : Count: 10 Min: 228759 Max: 420236 Total: 3587597 Avg: 358759 (358 msecs)
   Write : Count: 10 Min: 307095 Max: 348767 Total: 3205704 Avg: 320570 (320 msecs)
   Read : Count: 10 Min: 572400 Max: 657219 Total: 5959630 Avg: 595963 (595 msecs)
2016-10-10 08:45:34 +10:00
a4b65212c9 Add test of pbd/xml++.h API performance with three file sizes
Generate, write and then read three Session like XML files to test the
performance of changes made to pbd/xml++.h API
2016-10-10 08:45:34 +10:00
4b2987d0f2 Add XMLNode::operator==/!=() for comparing XMLNode instances
Implemented to be able to test that when writing an XML document via XMLTree
and then reading back into another XMLTree the structure is equivalent as a
general API test of pbd/xml++.h to check for breakage when changing
implementation.
2016-10-10 08:45:34 +10:00
734a4c10e4 Change position of average in PBD::timing_summary and add msecs 2016-10-10 08:45:34 +10:00
116dace033 Add PBD::Timing::elapsed_msecs() as convenience API 2016-10-10 08:45:33 +10:00
Kamil Rytarowski
e426f0777a NetBSD ships with backtrace(3) in libexecinfo 2016-10-04 22:18:52 +02:00
Kamil Rytarowski
9d3077bd03 NetBSD uses statvfs for the functionality of statfs on Linux 2016-10-04 22:18:23 +02:00
b6c80153c3 add API to create [tar.xz] archives 2016-09-19 11:33:07 +02:00
02b7db03bd PBD::canonical_path will no longer throw so change test 2016-09-19 15:55:39 +10:00
569167a603 Move PBD::canonical_path to pbd/file_utils.h/cc and reimplement for Windows
This fixes the libpbd testCanonicalPathUTF8 and libardour
open_session_utf8_path unit tests

You can now have Sessions with localized names containing characters that
aren't in the system codepage on Windows.

It also fixes the issue where a Session would not open when it was moved into a
path with characters that aren't in the system codepage.

The only use case for calling canonical_path/realpath on the session path
AFAICT is for resolving relative paths that are passed via the command
line/terminal. I'm doubtful that works correctly on Windows because of
character encoding issues with the current API we use for that(not glib), so it
is slightly ironic that this issue was caused by an incorrect implementation of
a function that is not really necessary on Windows at this point in time.
2016-09-19 14:47:52 +10:00
9192a2e969 Add test for PBD::canonical_path on Windows using utf8 strings
This currently fails because the windows only realpath implementation in
pbd/pathexpand.cc, which is called from PBD::canonical_path to resolve the path
uses Glib::locale_from/to_utf8. As I demonstrated in the
testOpenFileUTF8Filename test case Glib::locale_from/to_utf8 are not the
correct functions to use for this use case as it converts to/from utf-8 to the
locale's current character encoding.  On Windows this is most often a single
byte encoding such as Windows-1252 and conversion will fail if the path
contains any characters that are not in system codepage.
2016-09-19 14:47:52 +10:00
aa77c2eb58 Give the Windows MMTimer test a better chance of passing
The default scheduling on windows seems fairly erratic or is at least in the
VM that I'm running these tests on, so increase the timing slack a bit so the
test has a better chance of passing. It is still quite easy for it to fail
though, especially if you for instance manipulate the terminal window somehow
while running the tests but it does not really matter in any case as this test
serves its purpose in testing the PBD::MMTimers API.
2016-09-19 14:47:52 +10:00
e9e412b989 Modify our MSVC project to use the newly introduced 'libarchive' library (libpbd) 2016-09-15 14:39:38 +01:00
77bd398153 implement file-[un]archive progress report 2016-09-14 23:10:41 +02:00
53ee3e2e72 Add support for built-in file/url unzip/untar
This introduces new build-dependency: libarchive
(http://www.libarchive.org/)
2016-09-13 16:14:40 +02:00
0ff233d234 Update our MSVC project files to generate the most recent Ardour session file format (ver 5) rather than the older v3 format 2016-08-30 07:15:00 +01:00
8e2d1c7f2a Move 'round()' / 'trunc()' etc so that they won't conflict with any versions already available in MSVC 2016-08-19 14:11:01 +01:00
a0b117b948 'roundf()' wasn't introduced in MSVC until VS2013 - so for the time being, let's emulate it using 'floorf()' 2016-08-19 14:11:00 +01:00
09ed9c44e7 change PBD::Transmitter code to use PBD::Signal<> not sigc::signal<>, since the latter is not thread safe 2016-08-14 08:33:23 -04:00
eec294a97e the endless quest to plug memory leaks -- episode 378 2016-07-25 17:16:32 +02:00
0fd2d82a6d add missing header include 2016-07-19 20:33:36 +02:00
c1aef0084a tweak realloc-pool realloc behavior.
* ignore provided old-size from lua, use internal segment size.
* fix behavior on OOM (leave memory untouched)
2016-07-19 15:05:16 +02:00
d13435a4e1 re-add TLSF 2016-07-19 15:03:51 +02:00
ee2d7a2d0c add exception handling in LocaleGuard, to try to cover more OS X wierd/corner cases 2016-07-18 10:56:43 -04:00
defb46d0fd Add a newly introduced source file to our MSVC project (libpbd) 2016-07-18 09:39:36 +01:00
82828bd7a6 prevent duplicate symbols (fix OSX compilation) 2016-07-14 23:11:11 +02:00
cf52d6e4b4 enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.h 2016-07-14 14:45:23 -04:00
58657edfb3 redesign PBD::LocaleGuard to work correctly (i.e. not break translations) 2016-07-14 11:37:48 -04:00
311a5f1462 add a natural sort algorithm 2016-07-14 16:52:43 +02:00
8de675d699 fix simple but fatal mistake in defining PBD::Controllable::Flags enums.
This error caused the flags to be saved as an empty string, thus losing all state when the session is reloaded
2016-07-12 08:34:35 -04:00
7dfd39e708 add a single-element ring-buffer write function 2016-07-10 15:56:18 +02:00
58b2931685 add the potential for a bit more debugging of signal connects 2016-07-01 17:47:05 -04:00
ba700ecc63 add the potential for a bit more debugging of signal connects 2016-07-01 17:47:05 -04:00
86763cba90 Enable build for FreeBSD (part 1/2)
Adopted from Michael Beer -- GH pull-request #232 with minor changes:

*   rebased on master,
*   removed trailing whitespace,
*   don't explicitly change saved configuration defaults (wscript)
*   moved sys/wait (WNOHANG) to header include
*   separate changes in GUI and lib
2016-06-26 16:43:07 +02:00
f592b6c07b Accommodate recently removed source(s) in our MSVC project (libpbd) 2016-06-01 14:30:26 +01:00
d5127001bb move ControllableDescriptor from libpbd to libardour; add support for describing VCAs 2016-05-31 15:30:42 -04:00
e1bcd70712 a slew of as-yet incomplete work to get VCA solo+mute closer to working 2016-05-31 15:30:40 -04:00
0cf89e76ef add new enums 2016-05-31 15:30:40 -04:00
2c6d595614 add a new Controllable::NotAutomable flag 2016-05-31 15:30:40 -04:00
653ae4acd6 universal change in the design of the way Route/Track controls are designed and used. The controls now own their own state, rather than proxy for state in their owners.
Massive changes all over the code to accomodate this. Many things are not finished. Consider this a backup safety commit
2016-05-31 15:30:40 -04:00
5531c83496 change API of Controllable::Changed signal to include (from_self, GroupControlDisposition)
This allows the signal to convey more information, which may be required by some handlers of a control's Changed signal
2016-05-31 15:30:40 -04:00
984f4487e0 remove debug output 2016-05-31 15:30:38 -04:00
4d14ae4e23 mostly restore VCA state on session loading.
This does not restore VCA assignments
2016-05-31 15:30:38 -04:00
22e031135a Emulate 'log1p()' and 'expm1()' using 'log()' and 'exp()'
(for MSVC which didn't implement those functions until very recent versions).
2016-05-28 19:07:22 +01:00
b0200b23f2 Accommodate the fact that 'msvc_resources.rc.in' got moved to a new path 2016-05-21 10:33:18 +01:00
6d343ba3c6 fix LocaleGuard contstructor (3dc77280) 2016-05-07 12:19:41 +02:00
f445ba8bdc locale debugging 2016-05-07 12:15:12 +02:00
3d7cbe9d94 trying to get to the bottom of the decimal comma. 2016-05-07 01:22:32 +02:00
3dc7728038 we always only use the "C" locale when saving. 2016-05-05 21:49:56 +02:00
2624c0966b remove assert()s from LocaleGuard 2016-05-05 20:29:28 +02:00
bb99df867f minor comment change 2016-05-05 14:21:55 -04:00
25603d810f spelling fixes and an explanatory comment 2016-05-05 14:21:02 -04:00
f2c5522f0f rework locale-guard for C and C++ locales
let's hope querying the C-locale is more lightweight than setting it
on windows.
2016-05-05 20:02:48 +02:00
17ace643e4 OMNIBUS COMMIT: prefer const XMLNode::property method (and provide a real one) 2016-05-04 23:09:45 -04:00
255b5174c4 add a const method to check for existing key/value properties
handy to lookup up XMLNodes with "id" == ID w/o allocating memory.
2016-05-03 03:03:00 +02:00
4b8bc84e4a let GMainContext clean up after us.
this fixes a potential crash in
AsyncMIDIPort::~AsyncMIDIPort() -> CrossThreadChannel::~CrossThreadChannel()
2016-04-26 19:45:06 +02:00
f6a621346c some notes on mem-leaks... 2016-04-24 14:43:18 +02:00
04c56a0618 some strategic documentation
Prevent class descriptions inheriting the doc from PBD:Stateful by
adding some specific doc.
2016-04-12 17:03:44 +02:00
ff05c82312 Revert "experimental session-save speedup" -- needs C++11
This reverts commit d1dcedaccf.
2016-04-08 21:21:38 +02:00
3def1b2830 more potential session-save speedup.
std:vector trumps std::list speed in all aspects: traversal, insertion
(at end) and Deletion.  ..but we'll have to be careful about iterators..
2016-04-08 21:03:23 +02:00
d1dcedaccf experimental session-save speedup
property order is not important,
unordered_map lookup and insertion is O(1)
2016-04-08 20:32:49 +02:00
e19744430a don't collect rt-mempoll statistics anymore (by default) 2016-04-03 23:54:53 +02:00
a9187a9e25 Add a few class documentations to override inherited doc.
clang doxygen comments follows class inheritance.
Undocumented Ardour classes which inherit from sigc::trackable
also inherit sigc's documentation.
2016-03-31 01:16:07 +02:00
4561788777 fix optimized build 2016-03-19 17:14:23 +01:00
2288e04a5b suppress realloc-poll debug messages in optimized builds 2016-03-19 10:51:15 +01:00
591f92e531 add new Controllable::GroupDisposition value, ForGroup, to identify changes being made *for* a RouteGroup 2016-03-14 10:41:33 -04:00
Florian Weimer
5a41b86028 fix __cpuid() on x86
The previous version used memory operands that gcc (probably dependent
on optimization flags and/or version) could address relative to the
stack pointer, but pushing %ebx onto the stack changed it. Here, the
address of the regs array is put into %esi and the individual members
are written into directly.
2016-03-08 14:54:41 +01:00
3dc09d42ab allow to override FPU detection 2016-03-04 18:05:47 +01:00
22ed6fb1f7 Accommodate newly introduced source(s) in our MSVC project (libpbd) 2016-02-27 16:29:52 +00:00
0e36f8e2d7 missing include for rand() in self-tests 2016-02-23 22:55:17 +01:00
f2afb95c5d add realloc pool to MSVC project 2016-02-22 22:06:47 +01:00
3c87629c7e realloc-pool unit-test 2016-02-22 22:06:47 +01:00
6cf5e989c0 time-bound memory-pool
O(1) realloc() for use with Lua.
A standard malloc/free/realloc API is exposed for testing and other
potential use-cases.

The current configuration it's performs well for lua-metatables
(regular calls to realloc() with varying tiny chunks ~1-50 bytes)
For the use-case at hand it outperforms TLSF.
2016-02-22 22:06:47 +01:00
e9234c856a add syntax and scaffolding for MIDI binding maps to refer to selected tracks/busses.
THIS DOES NOT WORK YET. Selection information is not available in libardour at this time
2016-02-22 15:31:25 -05:00
Adrian Knoth
6fa88273aa Spelling correction patch from Debian
Patch taken (and forward-ported to HEAD) from
<https://anonscm.debian.org/cgit/pkg-multimedia/ardour.git/plain/debian/patches/0100-fix-typos.patch>
2016-02-22 15:13:01 -05:00
ec708926fa now with return value 2016-02-17 17:03:14 +01:00
5e50a7d6cf allot to open OSX Finder with arbitrary paths 2016-02-17 16:29:25 +01:00
455f07d087 fix rare livelock in std::map thread_buffer_requests
During initial session load it's possible that two threads call
PBD::notify_event_loops_about_thread_creation() simultaneously
(in particular the process threads). This can lead to an
endless loop in stl_tree.h when assigning thread_buffer_requests[key]

Now we only have WriteLocks.. unless some better solution comes up a
Mutex will do.
2016-02-14 02:13:04 +01:00
820bd0fe51 and another typo in d442190b 2016-02-14 00:10:41 +01:00
09167d3e59 fix typos in d442190b 2016-02-14 00:02:00 +01:00
d442190b8a slightly improved windows post-export hook support. 2016-02-13 23:12:50 +01:00
73245c6217 some half-baked support for windows command-arg substitutions 2016-02-13 17:04:11 +01:00
108528b63d amend d814acb - SystemExec/Export debugging 2016-02-13 01:39:41 +01:00
d814acbb8f add some debugging capability for users of SystemExec. Needs review. 2016-02-12 18:22:12 -06:00
2429308bac Open URis with spaces. 2016-02-11 16:43:35 +01:00
57b9dab27c manually revert ec8cf4e4 with an extra comment explaining the significance 2016-02-03 11:45:23 -05:00
ec8cf4e4f5 Fix µ-iness. 2016-01-27 23:39:35 +01:00
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
cd401f5ab4 add new enums to libs/pbd enums registration 2016-01-18 12:11:09 -05:00
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
2386410e4a remove debug output 2016-01-14 11:00:50 -05:00
9ab92a67c8 use correct type of lock when removing a thread request buffer 2016-01-14 11:00:40 -05:00
35807a1929 fully clean up request buffers when a thread dies 2016-01-14 10:53:32 -05:00
077c65cc2a manually revert 4b3043cc and 141e6fb8181; add detailed explanatory comment 2016-01-14 09:05:06 -05:00
141e6fb818 don't pick up already dead thread request buffers when setting up an event loop 2016-01-13 23:25:17 -05:00
4b3043ccda use a unique key to store per-thread request buffers 2016-01-13 23:00:02 -05:00
d3ad5c16d1 yet more event loop debug tracing 2016-01-13 21:13:55 -05:00
6d04a66eea more event loop debugging 2016-01-13 19:48:17 -05:00
3e45254257 typo fix 2016-01-13 18:14:52 -05:00
f3c9f5894a lots more DEBUG_TRACE statements for analysing malfunctioning system 2016-01-13 17:03:49 -05:00
bcb865c235 improved debug trace messages from BaseUI class 2016-01-12 22:11:44 -05:00
f1d0de029d remove debug output 2016-01-10 23:34:10 -05:00
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
80a730550d clang build fix (uint32_t is not declaed) 2015-12-29 18:49:56 +01:00
23333a271e fix windows/mingw builds 2015-12-29 10:30:27 +01:00
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
d880645cac Modify our MSVC project to accommodate newly introduced/removed source files (libpbd) 2015-12-23 15:09:17 +00:00
b48d87b3ea add API to query stateful ID override mode 2015-12-17 23:18:22 +01:00
6e13b91a35 portable pthread_self() debug message 2015-12-13 11:28:56 +01:00
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
a419fb5af0 fix endless-loop-at-shutdown bug now that abstract UI request buffers are used 2015-12-12 11:12:10 -05:00
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
162352419d NO-OP re-indent 2015-12-12 14:54:52 +01:00
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
Kamil Rytarowski
2da6e45922 NetBSD: Stop hardcoding Python binary name
Caught with pkgsrc on NetBSD
2015-12-07 13:24:36 +01:00
c93f0b77bf rename ProcessSemaphore to Semaphore (libs) 2015-12-02 20:18:48 +01:00
15c958e32f consolidate semaphore implementation (part three) 2015-12-02 16:09:51 +01:00
003b632ed1 consolidate semaphore implementation (part one) 2015-12-02 16:03:28 +01:00
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
7f3118c8fe Don't indent inside namespace declaration to be consistent with ardour style 2015-12-01 14:22:38 +10:00
e025415516 Use PBD::demangle_symbol in PBD::demangled_name<T> to reduce code duplication 2015-12-01 14:22:38 +10:00
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
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
73d1de3b75 NOOP, remove trailing whitespace, replace tabs in python scripts 2015-11-29 17:54:31 +01:00
81103d822a use thread private data **pointer** correctly for Stateful::ID regeneration 2015-11-17 08:53:29 -05:00
d2cba4d7ac fix inadvertently commit error related to at-process-exit deletion for thread private variable 2015-11-16 21:55:57 -05:00
e1dc2d4604 correct value testing for Stateful thread-private variable controlling ID regeneration 2015-11-16 21:24:10 -05:00
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
a4daf93f2f Use XMLNode::remove_child_and_delete in Stateful::add_extra_xml
As the node being replaced has been added with XMLNode::add_child_nocopy the
node also needs to be deleted or a memory leak occurs.
2015-11-10 23:14:17 +10:00
4e6cdb4daa Use constructor initialization list in Stateful class 2015-11-10 23:14:16 +10:00
9e4dc284ee Replace spaces with tabs in pbd/stateful.h 2015-11-10 23:14:16 +10:00
7abfe85498 add API to suspend timers signal emission. 2015-10-30 15:55:26 +01:00
eb6b4f4b15 fix crash on SystemExec::Terminate
if Terminated() connects in the same thread and deletes the class itself
the closure in interposer_thread() can fail.
2015-10-23 23:29:04 +02:00
3bd928591b Add PBD::Searchpath::contains method to check if a Searchpath contains a path 2015-10-22 11:51:03 -04:00
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
6ca3a1593e add commentary and clean up blank lines 2015-10-21 22:31:35 -04:00
ea95bef27b variable name change: percent is 0..100, 0..1.0 is a fraction 2015-10-21 08:09:40 -04:00
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
740c4dd134 possible fix for invalid cleanup space calc on win32. 2015-10-20 15:50:00 +02:00
af3ffc8610 NOOP, re-indent 2015-10-20 15:49:59 +02:00
b00d75adf6 add safety checking when setting up DEBUG bits 2015-10-15 08:59:11 -04:00
ce03b02a79 in a CrossThread object, ensure destruction of the channel and source used on Posix
The source holds a reference to the channel; both must be unref'ed/destroyed in order to
fully clean up resources
2015-10-08 21:55:37 -04:00
14932d1b86 allow to load huge VST plugin states -fixes #6623
by default libxml has a XML_MAX_TEXT_LENGTH of 10M
with base64 encoding that allows at most 2.5MB state.

set XML_PARSE_HUGE to read large sessions
2015-10-07 14:36:32 +02:00
2397429e99 use quotes for in-tree pbd/glib wrapper include 2015-10-05 22:15:18 +02:00
22b07e0233 NOOP, remove trailing tabs/whitespace. 2015-10-05 16:17:49 +02:00
4178db5f63 globally remove all trailing whitespace from .cpp and .hpp files missed by previous commit 2015-10-04 15:11:15 -04:00
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
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
f5b3ad18cf PBD::Debug to stdout
fixes debug output on windows. std::cerr is lost,
only std::cout, printf() and fprintf(stderr, ..) work.
2015-09-21 23:08:45 +02:00
2e9e8d3b33 Fix windows test to also pass under wine
It looks as if the default timer resolution for applications running under wine
is different than Windows so just test that the minimum timer resolution is
below a certain amount rather than checking before and after calling
timeBeginPeriod
2015-09-19 10:59:39 +10:00
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
44ea59495c MSVC projects - accommodate some modules that recently got moved or removed
(mostly these got moved out of the PortAudio backend and into libpbd)
2015-09-18 10:25:11 +01:00
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
e44212321e Add test to libpbd to check PBD::touch_file and pbd/gstdio_compat.h
GStatBuf is not usable on 32 bit Windows without the redefinition in
pbd/gstdio_compat.h so add a test to check for the correct behavior of
g_stat and g_utime on all platforms now that the issue is fixed.
2015-09-17 23:26:38 +10:00
95b55c7346 fix g_lstat() 2015-09-17 15:01:26 +02:00
7ac691ec82 use pbd's gstdio compatibility wrapper 2015-09-17 14:37:57 +02:00
c90bab4d4e add glib/stdio compat wrapper for mingw64-w32 2015-09-17 14:36:47 +02:00
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
9bd893a6a2 Make sure the QPC frequency is cached so the timer can be used 2015-09-16 22:50:37 +10:00
35a1c3b6a5 Put functions inside anonymous namespace and use static for internal linkage 2015-09-16 11:22:17 +10:00
5d9144173b Mark strings intended for developers/debugging as not for translation 2015-09-16 11:22:17 +10:00
d007fc05b1 De/Initialize MMCSS on windows in PBD::init/cleanup instead of in PA Backend 2015-09-16 11:22:16 +10:00
091c4ed3a7 Move Windows MMCSS related utility functions into libpbd 2015-09-16 11:22:16 +10:00
76a0c823ca Add PBD::DebugBit for debugging thread related debugging output 2015-09-16 11:22:16 +10:00
f58e3abdbe Perform QPC timer check on windows in PBD::init when PBD_TEST_TIMERS env is defined 2015-09-16 11:22:16 +10:00
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
cd05d46c00 Add windows specific test for pbd/windows_timer_utils.h API 2015-09-16 11:22:16 +10:00
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
62f75b8b16 Remove glib timer test from pbd testsuite
There are no test assertions and it takes a long time to execute the test so
just leave it disabled for now.
2015-09-16 11:22:16 +10:00
3f5c01e4eb Move Windows timer utility functions from PA backend into libpbd 2015-09-16 11:22:16 +10:00
8e8f8d92c2 allow to run unit-test under wine from srcdir. 2015-09-13 15:30:00 +02:00
eb998b3264 plug some memory leaks in libs 2015-09-12 20:05:25 +02:00
a5e3371b80 Event Pool usage debugging, see also 6ade16b38 2015-09-12 02:18:38 +02:00
ebfd0782e1 add missing include 2015-09-05 11:36:16 +02:00
b66bf67030 fix bitwise enum parsing 2015-09-05 00:00:16 +02:00
a272c50597 Move AudioBackend related debug bits into libardour
I put these in libpbd as that is where the debug bits are for the Waves backend
but I think it makes more sense for them to be in libardour as that is where
the AudioBackend class is defined

I left the Waves debug bits in libpbd for now.
2015-09-02 12:07:14 +10:00
463cf1cf9c Add PBD::DebugBit for debugging issues with undo history 2015-08-19 13:56:06 +10:00
a2fbce0e7f Change return type and name of get_win_special_folder
Rename it get_win_special_folder_path to indicate what it is returning

Move documentation for the function into the header and use doxygen style
comments.

Fixes a couple of memory leaks in ArdourVideoToolPaths class although it looks
as if there are more.
2015-08-18 15:33:03 +10:00
ea32eecf3d Fix Searchpath::operator+ to return by value rather than reference and not modify *this
ladspa_search_path was the only function using this API and it is unaffected by
the change
2015-08-18 15:09:44 +10:00
1d2938b162 Add '_xgetbv()' for MSVC-9 and earlier 2015-08-16 13:14:54 +01:00
f77a409b0c tweaks for AVX detection 2015-08-14 08:53:06 -04:00
5a304e9e33 fix PPC builds 2015-08-12 19:16:01 +02:00
c86b82aa8a comment tweak to show that the __cpuid() intrinsic belongs to MSVC and mingw 2015-08-11 23:45:52 -04:00
94b6e7ffe4 fix mingw compilation 2015-08-12 05:25:29 +02:00
b6f9bbeb2f can't use xgetbv instruction with apple gcc under OS X Lion 2015-08-11 23:06:47 -04:00
41ccfee7a4 clean up FPU code with some ideas from Chromium and the web 2015-08-11 23:00:13 -04:00
bb399c8787 fix stupid logic error in testing separate bits required for AVX support 2015-08-11 20:18:38 -04:00
bb5c969ac0 improved solution for xgetbv() on windows and linux with all compilers 2015-08-11 17:45:41 -04:00
53bc2ba2c1 #ifdef out AVX detection on APPLE 2015-08-11 17:30:33 -04:00
c0ad97c179 add required test of OS support for AVX register use 2015-08-11 17:23:11 -04:00
4079855507 add test for CPU/FPU AVX capabilities 2015-08-11 16:36:46 -04:00
9e918563df remove cruft 2015-08-07 21:10:47 +02:00
e057b873b5 amend e09c620; now with semicolon :) 2015-08-03 23:09:51 +02:00
e09c62052d fix backslashes in quotes (windows), fixes VST scan 2015-08-03 23:06:08 +02:00
e258c827e2 WinMME based midi input/output for portaudio backend
TODO:

Use MMCSS to elevate thread priorities
Enable/test and fix SYSEX related code
2015-07-31 09:59:54 +10:00
009a06a773 Move ARDOUR::touch_file to pbd/file_utils.h 2015-07-26 12:15:19 +10:00
44cba53219 Revert "When saving a session (in a non-English locale) make sure that we use a locale-specific path"
This reverts commit cf5a8651d8.
2015-07-25 23:14:50 +10:00
b2ff1e1734 Add unit test to check that libxml2 expects utf-8 encoded file paths on Windows 2015-07-25 23:14:50 +10:00
226087d06a Only create one test output directory in file copy test
Rather than one directory for each file
2015-07-25 23:14:50 +10:00
dfe2ac1d38 Add unit test to assert that using locale_from_utf8/::open will fail for some file paths on Windows 2015-07-25 23:14:45 +10:00
cf5a8651d8 When saving a session (in a non-English locale) make sure that we use a locale-specific path 2015-07-23 17:55:13 +01:00
7742d07b3a fix compilation w/o posix_malign 2015-07-19 23:24:19 +02:00
2f10fb5b96 OSX 10.5/PPC compat
posix_memalign is 10.6 or later
2015-07-19 23:02:24 +02:00
e29fd9a2fd Minor changes to ensure that MSVC knows about 'CaptureStackBackTrace()' 2015-07-18 15:22:43 +01:00
f1aa1a0a11 fix headers for case-sensitive FS. 2015-06-30 08:18:52 +02:00
3392c05779 volatile should not be used to describe non-hardware lvalues, and fix const cast warning (which removes need for mutable) 2015-06-29 14:18:16 -04:00
2e29e7ee62 increase debug bitset size to accomodate additional debug bits imported from Tracks 2015-06-29 14:18:15 -04:00
943394a49a add PBD::DEBUG bits for WavesAudio and WavesMIDI 2015-06-29 14:18:14 -04:00
Greg Zharun
320da29922 [Summary] AudioPort buffer does not need 64 byte alignment which cache_aligned_malloc provides.
Added new function which accepts argument to specify required alignment.

AudioPort buffer requires 32 byte alignment

[Review Required] YPosdnyakov
2015-06-29 14:18:14 -04:00
480f1e4082 noop: fix indentation/whitespace 2015-06-29 14:18:14 -04:00
6410aa896f Added optimized AVX function for sample processing
Added AVX versions of existing 5 SSE functions. Added 6th AVX function to copy vectors which is 1.5 times faster then memcpy.
Data consistency and validness  is fully tested after processing with new AVX functions on aligned and non aligned buffers.
2015-06-29 14:18:13 -04:00
7fae6bcd87 copy all XCode project files from Tracks.
Rationale: the Waves team maintains the XCode project files, the Ardour crew doesn't. Thus, the Waves'
version is more canonical
2015-06-29 14:18:10 -04:00
Greg Zharun
92e4f227de [Summary] Added correct memory alignment for Windows in ../pbd/malign.h
[Reviewed by] YPozdnyakov
2015-06-29 14:16:43 -04:00
GZharun
ef59fbffa1 [Summary] Added possibility to identify IO thread which does not have required resources initialized during process callback handling
Conflicts:
	libs/ardour/ardour/audioengine.h
	libs/backends/wavesaudio/waves_audiobackend.cc
	libs/pbd/pbd/pool.h
2015-06-29 14:16:42 -04:00
017e580c9f add stacktrace() support for Windows (Grygorii Zharun) 2015-06-29 14:16:42 -04:00
cc543280d9 We were 2 more debug "bits" away from overflow, so recast PBD::DEBUG mechanism away from a 64bit integer and toward std::bitset.
Clean up a few minor related PBD::DEBUG issues along the way
2015-06-12 18:14:09 -04:00
801af5df9e Add the new (UINTSDEFINED) preprocessor directive to all out MSVC projects (just to be on the safe side) 2015-06-09 13:18:42 +01:00
2b294f0b43 add a sanity check 2015-04-30 21:15:35 +02:00
a3209b9b91 Correctly dereference 'fxbuf' when building with MSVC 2015-04-30 18:17:24 +01:00
fe3aafec1c When testing for x86 / x64 architecture, don't forget the symbols that MSVC can understand 2015-04-30 18:17:23 +01:00
d75b27f6dc allow to compile PBD::Signals w/o connection debugging 2015-04-27 17:19:58 +02:00
9687c756a6 const iterators 2015-04-27 17:19:57 +02:00
27dac7c31f Expose “/route/trim” midi binding. 2015-04-26 19:07:45 +02:00
6cb742c289 windows 32bit asm/fpu support.
This still leaves cache_aligned_malloc() in
libs/pbd/malign.cc pending _aligned_free (windows crashes when using
free() on memory allocated with _aligned_malloc()).

So far however there seems to be no issue with default malloc
for audio+midi buffers on win32…
2015-04-24 02:43:52 +02:00
63b3d06fd7 add missing regexp support to pbd/wscript 2015-04-24 00:41:23 +02:00
91b9d6c063 separate build host & target (fix win32 asm) 2015-04-24 00:33:34 +02:00
27b64e481a Remove a 'no longer needed' source from our MSVC project (libpbd)
(FPU functionality was recently merged into a single source file)
2015-04-22 10:44:23 +01:00
e015c57663 <intrin.h> is for windows only 2015-04-21 12:31:02 -04:00
e3156c2cc4 add required header for windows compile of FPU code 2015-04-21 12:25:21 -04:00
9241f58188 fix build of FPU code on OS X by reverting to use of _LP64 to identify 32/64 bit situation 2015-04-21 12:13:00 -04:00
a5d7e8446b merge all mingw and msvc specific code for FPU information into libs/pbd/fpu.cc and remove msvc-specific version 2015-04-21 11:39:31 -04:00