Age | Commit message (Collapse) | Author |
|
|
|
downstream buses
|
|
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)
|
|
|
|
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
|
|
|
|
These have been "normalized" in XMLProperty ctor for many years, so this does
not change the Session format.
|
|
These have been normalized/modified by the XMLProperty ctor for many years (~9)
so special treatment when reading properties should not be needed.
|
|
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.
|
|
|
|
|
|
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.
|
|
The equivalent function is now PBD::string_to<bool>
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
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.
|
|
|
|
|
|
Keep ID::print in place for now and replace usage in subsequent commit to
minimize changes
|
|
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.
|
|
Tests requires a locale installed on the host that uses a comma as the decimal
mark/point.
|
|
1st line after /** brief description.
Doxygen is used for Ardour's online source doc and the Lua class reference.
|
|
|
|
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.
|
|
This is for debugging errors with string conversion for cases where errors
aren't handled
|
|
|
|
|
|
This reverts commit e965e5edcdd9fdc8a4c68b4d50656cd4e0c53f18.
|
|
This does clutter up stderr, but only because instant.xml is arguably
saved much too often (and it's not really instant :)
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
This partially plugs a memory leak of event-loops.
|
|
|
|
|
|
|