Commit Graph

266 Commits

Author SHA1 Message Date
Mads Kiilerich 91314b68a5 temporal: always use Temporal::reset() for superclock and TempoMap default values
Make sure all code paths that use Temporal will initialize and reset it
properly. Some code paths (in tet runners) doesn't use Sessions, so
Temporal::reset() has to be invoked directly.

Just set the static superclock variable to 0 as initial value.
TempoMap will still be initialized early as a singleton, but we
introduce a new constructor so it is created empty (and thus not really
usable until Temporal::reset() or similar has populated it).

We can thus drop the static initialization of superclock. The default
superclock rate of 282240000 will now only live in Temporal::reset().

With this change there should no longer be any uninitialized use of
superclock_ticks_per_second(), and there should not be any problems for
DEBUG_EARLY_SCTS_USE to catch. (It is however broken in other ways -
that will be fixed next.)
2023-09-20 12:30:53 -06:00
Paul Davis 3b565693c8 objects don't have a time domain, they have a time domain provider (libs) 2023-08-02 15:22:52 -06:00
Paul Davis a8c2585cdc remove AudioEngine::destroy() calls from various test/util code
ARDOUR::cleanup() does this, and the engine must exist during port deregistration.
2023-06-30 12:58:43 -06:00
Paul Davis b35518e212 switch from boost::{shared,weak}_ptr to std::{shared,weak}_ptr
This is mostly a simple lexical search+replace but the absence of operator< for
std::weak_ptr<T> leads to some complications, particularly with Evoral::Sequence
and ExportPortChannel.
2023-03-24 14:19:15 -06:00
Paul Davis 39ed528e25 std-ize: convert all boost shared/weak ptr includes to <memory>
Also fix stdint.h -> cstdint and alphabetically order std includes
2023-03-24 14:19:15 -06:00
Ayan Shafqat 13562d94f4
Add AVX512F test to CPPUNIT 2023-02-05 16:16:59 +01:00
Marijn Kruisselbrink 185fe497c6
Fix AutomationListPropertyTest
These tests use reference files that were generated with a particular
value for superclock_ticks_per_second. The default for that has changed
since the last time the reference files were updated though, causing
tests to fail. Rather than updating the reference files for the new
default value, this makes the test not depend on the default value by
hardcoding the value that was used to generate the reference files.
2023-02-04 23:48:13 +01:00
Ayan Shafqat 6b766e41f4
Integrate AVX512F support into Ardour
The current implementation is just a stub of AVX and is not
utilizing AVX512F.
2023-02-04 23:07:17 +01:00
Robin Gareus 0f22f5e319
Identify surfaces by ID (not name) 2023-01-02 21:15:19 +01:00
Marijn Kruisselbrink bf7f6386d5
Re-enable lib/ardour/test/session_test.
This test seems to be compiling and passing just fine (when run in
isolation), so turning it back on seems like a good idea. To make it
pass when run as part of the full ardour test suite, this does remove
the WebSockets control surface from the control surfaces test though, as
that control surface messes up the event loop of the main thread, which
would otherwise cause use-after-free crashes in the session test.
2023-01-02 20:31:12 +01:00
Robin Gareus c09e66bb25 Fix apple/ARM FPU test, allow for FLT_EPSILON for unaligned math 2022-10-01 06:28:07 +02:00
Mads Kiilerich 9f69b8ccd9 tests: more helpful assertion failures from check_nodes
Tests would fail as:

  Test name: AutomationListPropertyTest::basicTest
  equality assertion failed
  - Expected: 4
  - Actual  : 5

It is slightly more informative when the size assertion is the last
check and it fails as:

  - Expected: state
  - Actual  : time-domain

The performance benefits from checking size first is not relevant.
2022-08-19 11:05:52 -06:00
Mads Kiilerich 58cc2aed87 tests: update automation list reference data
With this, all tests are passing for me.

While Ardour doesn't use TDD and has low test coverage, it is nice to
maintain that all active tests are passing.
2022-08-19 10:59:26 -06:00
Paul Davis 7bf89ce109 Constification: make Stateful::get_state() const, with all other required const-ness added (libs) 2022-04-06 21:56:59 -06:00
Paul Davis da95a0a0ee replace sample rate callback used for superclock<=>sample conversion
Now using a globally-scoped static variable which is updated by the
AudioEngine whenever an SR change occurs. Defaults to 48kHz and can
be used even before there is a backend.
2022-03-14 14:03:07 -06:00
Robin Gareus 50abcc74b5
Replace Glib::Threads with PBD::Thread (2/2) 2022-03-01 01:34:35 +01:00
Robin Gareus 47d34bfbfb
Tweak FPU test for FMA
FMA may return *more precise* results since there is no intermediate
rounding when computing (a + b * c).

(b * c) is evaluate with infinite precision and only the final result
after adding a is rounded to float32. This allows for a FLT_EPSILON
difference compared to rounding (b * c) first.
2022-01-03 02:34:53 +01:00
Robin Gareus 987df219e0
Fix building libardour unit-tests, disable BBT tests for now 2022-01-03 01:11:54 +01:00
Paul Davis 495cc1e4bc plugins use their route's automation time domain 2021-08-13 12:51:33 -06:00
Paul Davis e38e828152 use explicit timepos_t() for region start property in property lists (libardour edition) 2021-08-13 12:51:31 -06:00
Paul Davis 3ca2be321d use cleaned up Temporal ::quarters*_at* API (libs edition) 2021-08-13 12:51:31 -06:00
Paul Davis f4490f54c5 change Timecode::BBT_Time to use Temporal namespace, plus a couple of other minor changes to enable compilation
This still uses the tempo map object in libs/ardour, not the new one in libs/temporal, and isn't likely to be functional
(though it could be)
2021-08-13 12:51:28 -06:00
Robin Gareus 16da5419d3
Do not implicitly modify VST support config parameters 2021-08-10 15:54:37 +02:00
Robin Gareus 82c536ec81
Fix test/profiling tools
* use dummy-backend (don't expect engine to be running)
* add required TestUI / Receiver

Lots of regions: add scope to prevent SessionHandleRef
  existing across session deletion

RunPC: take process-lock before processing, prevents various
  assert() and concurrency issues.
2021-07-16 18:47:13 +02:00
Ayan Shafqat c856a862af
Add unit test for FMA extension routine 2021-01-01 21:08:06 +01:00
Robin Gareus bc9b94dfab
Fix -Wcatch-value in unit-tests 2020-12-06 22:06:59 +01:00
Robin Gareus 8de420aab9
Enable AVX FPU unit-tests 2020-10-17 18:18:22 +02:00
Robin Gareus e1b38058a8
Fix FPU unit-tests 2020-10-15 19:38:10 +02:00
Robin Gareus 5daed56439
Fix NEON FPU unit-tests 2020-10-15 04:14:44 +02:00
Robin Gareus 547032afac
Fix alignment unit-tests and ARM/NEON alignment 2020-10-15 03:55:42 +02:00
Robin Gareus 61310a9184
Enable AVX unit-tests 2020-10-14 23:08:28 +02:00
Robin Gareus cc935ab34e
Add basic FPU unit test 2020-10-14 22:52:43 +02:00
Robin Gareus e4e94e77c9
Transmitter::Debug implementation 1/2
This also sorts switch() and listen_to() statements in order
of severity: debug, info, warning, error, fatal, throw.
2020-10-13 21:58:26 +02:00
Robin Gareus 56934284e7
Start engine for plugin scan test
This is needed for various cases. The sample-rate needs to be known,
and reading/writing config includes TFSM state, which needs an engine.
2020-08-06 17:56:08 +02:00
Robin Gareus c6a8b848c9
Do not run plugin discovery for unit-tests
This fixes issues on MacOS (and Windows) unit-tests. The
unit-test run readless without proper UI thread. Discovering new
AU or VST can stall the app indefinitely or cause crashes.

NB. LADSPA, LV2 (and Lua) plugins are scanned regardless. Also
VST and AU cache files are read. The unit-test however only lists
LADSPA plugins.
2020-08-06 16:51:27 +02:00
Robin Gareus bfccf7ba18
Don't clutter up recent list with test sessions 2020-08-05 21:55:36 +02:00
Paul Davis 0f63b82943 fix error in multiple calls to SourceFactory::createWritable()
removal of tape tracks removed an intermediate argument in the argument list; presence of default args for the
last two arguments and implicit conversion from int->bool prevented the compiler from complaining
about any existing calls.

This supplements/extends a54b000a70
2020-03-23 21:47:13 -06:00
Paul Davis a4d7b45fe0 remove destructive/tape mode tracks 2020-03-17 16:31:49 -06:00
Paul Davis a855119bdd rename all Evoral source from .(hpp|cpp)$ to .(h|cc) 2019-11-02 16:32:18 -06:00
Robin Gareus 72d9a93baa
Improve Lua unit-test report 2019-09-06 18:36:32 +02:00
Robin Gareus 9052b29add
Remove ancient unit-test data
Evoral MIDI automation interpolation is tested separately,
there is no need to evaluate a complete old session
2019-09-06 03:09:39 +02:00
Robin Gareus 9630b148bc
Update template test session 2019-09-06 02:58:34 +02:00
Robin Gareus db063a6eb8
Unit test all RegionEquivalence options 2019-09-05 22:07:41 +02:00
Robin Gareus 772444d769
Unit-test update: honor FadeInAutomation parameter-range
Since 3d15499cda, libevoral enforces Parameter min/max
range. Ardour::ParameterDescriptor sets FadeInAutomation range to 0..2.
Hence all unit-test data needs to be in this range.
2019-09-05 21:03:50 +02:00
Robin Gareus 531ab8015c
Exclude Lua Convovler from unit-test (fails because of missing IR) 2019-09-05 20:17:57 +02:00
Robin Gareus 7731f768a6
Strict Ctrl surface unit-test: check re-activate. 2019-09-05 19:32:51 +02:00
Robin Gareus dfdce83452
New sessions are saved implicitly, remove explicit call 2019-09-05 17:01:19 +02:00
Robin Gareus cff4332bcb
Report Lua script that failed a unit-test 2019-09-05 15:29:15 +02:00
Robin Gareus 01c5aa34c6
Update MClk unit-test - new transportmaster API 2019-09-05 14:52:08 +02:00
Robin Gareus a22f918d9d
Update libardour GPL boilerplate and (C) from git log 2019-08-03 15:53:16 +02:00