bf728520ca
Optimize exponential interpolation.
2019-01-19 12:08:54 +01:00
55bc0eec91
adjustments for latest boost shared_ptr debug patch
2018-12-19 17:19:51 -05:00
1759d1c9c9
Fix a tiny memory-leak when calling vfork
2018-11-29 02:06:42 +01:00
d169864b5b
Prepare session-metadata export to external command
2018-11-20 23:56:12 +01:00
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
103ef2ba08
Add API to write raw data to child processes.
2018-11-19 02:26:43 +01:00
7c3fd2fe79
Glib throws a const FileError exception
2018-10-26 13:40:03 +02:00
8ed33f1bc7
remove use of hardcoded -fPIC compiler flag, and use compiler flag dict instead
2018-10-14 22:06:11 -04:00
78a3683233
Consolidate relative sched_get_priority computation
2018-10-11 15:29:50 +02:00
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
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
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
fb4ff01a18
better debug message with correct namespace for EventLoop::invalidate_request()
2018-08-07 10:44:56 -04:00
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
3534035091
Add a time-profiler with statistics
2018-05-17 22:15:07 +02:00
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
3856d525fb
Fix "open folder" for non-ASCII paths on Windows
2017-11-27 00:42:55 +01:00
c0dbe8eaaf
Move coreaudio_set_realtime_policy into libpbd
2017-10-30 16:31:38 +01:00
6e017eff22
Accommodate newly added/removed source(s) in our MSVC project (libpbd)
2017-10-27 13:08:32 +01:00
1aa96dc0a1
Add a RAII SpinLock (using boost's spinlock)
2017-10-26 22:33:46 +02:00
5c6e2b5802
Fix g_stat() for 64bit windows/mingw64
2017-10-18 17:54:39 +02:00
df83c0381e
Prepare support for compression levels (archive + flac)
2017-10-03 02:22:42 +02:00
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
506a29e2d3
Don't recurse into MacVST bundle-folders during plugin-scan
2017-09-21 20:02:11 +02:00
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
dc83dc7b58
Add TouchChanged signal (and re-indent)
2017-09-18 11:40:52 -04:00
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
7d88091229
Avoid assert() when loading xml: Throw an XMLerror if attribute_value fails.
2017-08-30 10:23:34 -05:00
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
229c9584bf
Add a PBD API to set pthread priority
2017-08-29 17:25:23 +02:00
8374e23014
Add API to set thread-priority (for ctrl-surfaces)
2017-08-05 01:28:11 +02:00
cec84d242d
NO-OP: whitespace
2017-08-04 16:26:37 +02:00
1ed9564ffd
Graph profiling: allow to override max DSP thread count & calc avg.
2017-08-04 16:26:26 +02:00
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
bde3edf1c8
Make start_touch() truly idempotent
...
Also don't allow outsiders to call Controllable::set_touching()
2017-07-25 20:15:12 +02:00
ddf55c0d88
PBD::init() failing is fatal in main(), don't silently exit.
2017-07-03 14:45:41 +02:00
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
6180c5a5fc
Accommodate newly introduced source(s) in our MSVC project (libpbd)
2017-06-22 17:59:16 +01:00
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
940be0cbb9
compilation requires <stdint.h>
2017-06-21 14:19:21 -04:00
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
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
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
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
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
5d683eaeca
NO-OP: whitespace and FSF address
2017-05-06 15:11:53 +02:00
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
9c0ba3b3d5
Add mechanism to reset/lock semaphores
2017-04-22 23:06:22 +02:00
048af97b54
Use correct property names in PBD::Undo class
...
These have been "normalized" in XMLProperty ctor for many years, so this does
not change the Session format.
2017-04-21 12:46:04 +10:00
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
ffff31b832
Relax LocaleGuards
...
Arodur itself on longer depends on C/C++ locale for saving/loading sessions.
However, the Localeguard is kept for 3rd party plugins: Reset the C locale
to "C" to enforce consisten numerics and portable sessions as well
as verify that no plugin changes the C++ locale.
2017-04-20 22:12:33 +02:00
251db7a608
Changes needed for building Tim's new 'string_convert' stuff with MSVC (libpbd)
2017-04-19 17:25:51 +01:00
1ce58ad90a
Add additional PBD::string_to/to_string specializations for PBD::ID
2017-04-19 09:37:02 +10:00
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
ac8b5192cd
Remove now unused PBD::string_is_affirmative function
...
The equivalent function is now PBD::string_to<bool>
2017-04-19 09:36:59 +10:00
6e467153a0
Remove unused XMLNode::add_property methods
...
These are now unused and functionality is replaced by XMLNode::set_property
set_property is a better name as a node can only have properties with unique
names and the property will be set or reset(if it already exists). Changing the
name also makes it easier to transition and test the new API.
2017-04-19 09:36:57 +10:00
e4b1ece143
Use XMLNode::set_property API in xml tests
2017-04-19 09:36:57 +10:00
e01d074ad1
Use XMLNode::set_property in PBD::PropertyTemplate<T> class
2017-04-19 09:36:48 +10:00
32f5464490
Use XMLNode::get/set_property API in PBD::ConfigurationVariable class
2017-04-19 09:36:48 +10:00
b320ba1aa5
Use XMLNode::set_property API in PBD::MementoCommand class
2017-04-19 09:36:48 +10:00
fe577dcbd5
Use XMLNode::set_property API in PBD::StatefulDiffCommand class
2017-04-19 09:36:48 +10:00
9587e11f97
Use XMLNode::set_property API in PBD::Undo class
2017-04-19 09:36:48 +10:00
799077025e
Use XMLNode::get/set_property API in PBD::Stateful
2017-04-19 09:36:48 +10:00
0aea5288cd
Use XMLNode::get/set_property API in PBD::Controllable
2017-04-19 09:36:48 +10:00
800fdd0f0f
Add pbd/types_convert.h header for PBD::to_string/string_to specialisations
2017-04-19 09:36:48 +10:00
ae27e33f29
Add a template based get/set_property API to PBD::XMLNode
2017-04-19 09:36:48 +10:00
2b58bbd50a
Use PBD string conversion functions in PBD::ConfigurationVariable
...
No longer need a specialization for bool as PBD::to_string/string_to already
has specializations for bool
Remove template specialization for float as string_to/to_string handles string
representations of infinity
2017-04-19 09:36:47 +10:00
3edb6b2e1f
Use PBD string conversion functions in PBD::Property class
2017-04-19 09:36:47 +10:00
95b4fd64dd
Add DEFINE_ENUM_CONVERT macro for defining PBD::string_to/to_string for enums
...
A simple macro for defining the four template specializations required to
convert an enum to a string and back using the existing string_2_enum and
enum_2_string functions. Generally these will only be instantiated in one
source file, I don't think it is necessary to explicitly instantiate any at
this stage.
2017-04-19 07:49:58 +10:00
f4f4c01f4c
Remove now unused ID::print method
2017-04-19 07:49:58 +10:00
4dd0203f01
Use ID::to_s() in libpbd instead of ID::print()
2017-04-19 07:49:58 +10:00
454b2d4e69
Use PBD string conversion functions in PBD::ID instead of snprintf
...
Keep ID::print in place for now and replace usage in subsequent commit to
minimize changes
2017-04-19 07:49:58 +10:00
13bfd1527a
Make boolean string values 0 and 1 to maintain backwards compatibility
...
I would prefer "yes" and "no" as it distinguishes boolean values from numeric
but using "yes and "no" results in PBD::Property<T>::from_string failing to
parse the correct values when opening in an older Ardour version as there is no
specialization for bool.
Using 0 and 1 also results in less change to the Session file.
2017-04-19 07:49:57 +10:00
272e02b6c8
Fix string-convert tests for Windows and hopefully macOS/OS X
...
Tests requires a locale installed on the host that uses a comma as the decimal
mark/point.
2017-04-17 13:21:02 +10:00
2e1a884d6e
Fix Doxygen syntax (amend/revert f1a4767ac
)
...
1st line after /** brief description.
Doxygen is used for Ardour's online source doc and the Lua class reference.
2017-04-16 17:26:58 +02:00
f18f7dca43
Accommodate newly introduced source(s) in our MSVC project (libpbd)
2017-04-16 12:53:11 +01:00
c634daef6a
Add locale independent and thread safe string conversion API with tests
...
All conversions are performed as if in the "C" locale but without actually
changing locale.
This is a wrapper around printf/sscanf for int types which aren't affected by
locale and uses glib functions g_ascii_strtod and g_ascii_dtostr for
float/double types.
My first attempt at this used std::stringstream and
ios::imbue(std::locale::classic()) as it should be thread safe, but testing
shows it is not for gcc/mingw-w64 on Windows, and possibly also some versions
of macOS/OS X.
Use "yes" and "no" when converting a boolean in PBD::string_to<bool> as this
seems to be the convention used throughout libardour which will allow using
string_to<bool> in those cases.
Add accepted bool string values from PBD::string_is_affirmative to
PBD::string_to<bool>
Mark strings in pbd/string_convert.cc as not for translation
Add u/int16_t string conversions to pbd/string_convert.h and tests
Add DEBUG_TRACE output on conversion errors
Add int8_t/uint8_t conversions(using int16/uint16 types) to string_convert.h
Add support for converting an infinity expression to/from string
Follows the C99/C11 standard for strtof/strtod where subject sequence is an
optional plus or minus sign then INF or INFINITY, ignoring case.
2017-04-16 14:02:41 +10:00
78b82b7ff2
Add PBD::DEBUG::StringConvert debug bit
...
This is for debugging errors with string conversion for cases where errors
aren't handled
2017-04-16 14:02:41 +10:00
f1a4767ac5
Fix indentation and make comment style consistent in PBD::PropertyList header
2017-04-16 14:02:03 +10:00
4d9690930a
Silence -Wunused-value
2017-04-16 00:15:53 +02:00
b66d31891b
Revert "profile instant.xml save"
...
This reverts commit e965e5edcd
.
2017-03-27 05:08:30 +02:00
e965e5edcd
profile instant.xml save
...
This does clutter up stderr, but only because instant.xml is arguably
saved much too often (and it's not really instant :)
2017-03-25 15:10:02 +01:00
7a709f23f1
Fix solo/mute when loading old (4.x) sessions.
2017-03-10 21:42:02 +01:00
5d5d9b8114
add new API to PBD::Controllable, ::get_save_value()
...
Designed to allow derived classes to *save* a different value
than would be reported by ::get_value().
Specifically there so that slaved controls can save/restore
their *own* state, not the value that ::get_value() would
return.
2017-02-06 16:49:08 +01:00
715b9a959a
Remove a JE addition to one of the qm-dsp source files (no longer needed)
2017-02-06 09:47:10 +00:00
5dabe45341
Some minor changes in preparation for building the newer Vamp plugins
2017-02-05 15:05:32 +00:00
db981b6085
more consistent terminology in a comment
2017-01-22 19:49:40 +01:00
8f8d0a70d8
Reap invalidation records
2017-01-20 13:54:03 +01:00
fbae5f5ffd
Free dead request-buffers
...
This partially plugs a memory leak of event-loops.
2017-01-20 13:53:59 +01:00
Dobroslav Slavenskoj
04b515d535
syncing with upstream
2017-01-05 09:24:40 +00:00
Dobroslav Slavenskoj
5f0857620e
Fixing LV2_SUPPORT #ifdefs
2017-01-05 09:24:40 +00:00
462c3eeb84
MIDI tracer actually changes the event-loop
2016-12-16 01:56:15 +01:00
6c88f339ca
some further invalidation details:
...
Prevent double unref during when the EventLoop terminates:
deleting the ringbuffer deletes all requests, some of which may
contain stale invalidation
remove the buffer_map_lock, now that signals ref-count the IR.
2016-12-15 18:19:38 +01:00
529b91828d
store InvalidationRecord in a Connection object and ref/unref it as appropriate
2016-12-15 16:36:50 +00:00
342c112ae3
add ::use_count() method to InvalidationRecord
2016-12-15 16:36:50 +00:00
cf4668a11e
std::list::erase() needs a non-const iterator.;
...
at least for some versions of gcc.
2016-12-15 11:40:22 +00:00
714da0f68e
and now with erase
2016-12-15 10:57:40 +01:00
71bfe79e2c
C++98 compatible iterator erase
2016-12-15 10:40:45 +01:00
a95be76741
rework request invalidation
...
This kills 2 birds with 1 stone: Removes the necessity of locks
and makes call_slot() realtime safe (req->invalidation->requests list
push_back). On object destruction, the invalidation-record (IR) itself is
invalidated.
Invalidated IRs are pushed onto a trash-pool and deleted in the event-loop
of the invalidated object (GUI thread) once all requests that reference it
have been processed.
One last detail remains: PBD::signal connect should reference the IR
and disconnect unreference it. This will guarantee that signal emission
will not reference the IR while the pool trash is dropped.
2016-12-15 06:11:30 +01:00
62b06fa427
Add a trash pool for invalidation requests.
...
While EventLoop::invalidate_request() does invalidate request in the
request-list. It does *not* invalidate requests in the
per-thread-request-ringbuffer(s).
The invalidation record cannot be deleted in EventLoop::invalidate_request
see 6b5891a78f
.
2016-12-14 22:39:25 +01:00
07bcdc7f0a
NO-OP: re-indent
2016-12-14 22:39:22 +01:00
77845f6019
Atomically to invalidate request
...
Yet another slightly overkill approach, but it /may/ explain crashes.
2016-12-14 22:39:18 +01:00
7dbdf6cc6d
Add some more invalidation debug messages.
2016-12-14 19:43:12 +01:00
6b5891a78f
The threading anecdotes - Episode 7
...
When do_request() destroys the receiver object, the receiver will
free the invalidation record. So the IR needs to be removed from the list
before executing the request.
Invalid read of size 8
at: AbstractUI<Gtkmm2ext::UIRequest>::handle_ui_requests() (abstract_ui.cc:242)
by: BaseUI::request_handler(Glib::IOCondition) (base_ui.cc:141)
by: sigc::bound_mem_functor1<bool, BaseUI, Glib::IOCondition>::operator()(Glib::IOCondition const&) const (mem_fun.h:2066)
by: sigc::adaptor_functor<sigc::bound_mem_functor1<bool, BaseUI, Glib::IOCondition> >::deduce_result_type<Glib::IOCondition const&, void, void, void, void, void, void>::type sigc::adaptor_functor<sigc::bound_mem_functor1<bool, BaseUI, Glib::IOCondition> >::operator()<Glib::IOCondition const&>(Glib::IOCondition const&) const (adaptor_trait.h:89)
by: sigc::internal::slot_call1<sigc::bound_mem_functor1<bool, BaseUI, Glib::IOCondition>, bool, Glib::IOCondition>::call_it(sigc::internal::slot_rep*, Glib::IOCondition const&) (slot.h:148)
by: sigc::slot1<bool, Glib::IOCondition>::operator()(Glib::IOCondition const&) const (slot.h:643)
by: cross_thread_channel_call_receive_slot(_GIOChannel*, GIOCondition, void*) (crossthread.cc:49)
by: g_main_context_dispatch (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.5000.2)
by: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.5000.2)
by: g_main_loop_run (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.5000.2)
by: gtk_main (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.31)
by: Gtkmm2ext::UI::run(Receiver&) (gtk_ui.cc:286)
by main (main.cc:408)
Addrd1b8 is 24 bytes inside a block of size 48 free'd
at: operator delete(void*) (vg_replace_malloc.c:576)
by: PBD::EventLoop::invalidate_request(void*) (event_loop.cc:98)
by: sigc::internal::trackable_callback_list::~trackable_callback_list() (in /usr/lib/x86_64-linux-gnu/libsigc-2.0.so.0.0.0)
by: sigc::trackable::notify_callbacks() (in /usr/lib/x86_64-linux-gnu/libsigc-2.0.so.0.0.0)
by: ProcessorEntry::LuaPluginDisplay::~LuaPluginDisplay() (processor_box.cc:1757)
by: ProcessorEntry::LuaPluginDisplay::~LuaPluginDisplay() (processor_box.cc:1760)
by: ProcessorEntry::~ProcessorEntry() (processor_box.cc:251)
2016-12-14 18:46:01 +01:00
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