20 Commits

Author SHA1 Message Date
Jonathan Thomas
4594cf85b6 Fix Tracker/ObjectDetector unit tests, due to new default values 2024-02-22 21:17:24 -06:00
Jonathan Thomas
09ce05bbf2 Many improvements for smooth audio playback when 'time' keyframes are used for time remapping.
- Added new Frame::ReverseAudio() helper method - for time keyframe support playing backwards audio
- Fixed math rounding error on time keyframe Resampler, to use the rounded source samples value
- Removed some unused args and Frame audio methods
- Reset FrameMapper resample context when non-adjacent frames are requested
- Correctly reverse Frame audio if a time keyframe is present, and reversing audio
- Rewrite Keyframe::IsIncreasing() function, to give accurate direction of time keyframes at any index (special logic to support first and last indexes)
- Fixed Keyframe unit tests - since logic has changed a bit
- Improved time mapping unit tests
- Replace many c-style casts with static_cast
- Added new sine.wav test file
2023-03-10 01:15:14 -06:00
Jonathan Thomas
59d46e59be Large refactor of Clip::GetFrame and time-remapping of audio samples.
- Refactor AudioLocation into own header
- AudioResampler now supports variable channels
- Adding cache back to Clips - to prevent the cost of multiple calls for the same GetFrame() frame, used in time-remapping
- Large refactor of Clip::GetFrame, to prevent multiple code paths, and much improved time-remapping
- Clip's time keyframe now supports Bezier and sub-frame precision - to you can curve audio speed using any curve shape
- Fixing # of audio samples on Clip frame's, based on timeline position (to predictably divide samples per frame)
- New Clip unit tests for time remapping and resampling audio, and reversing audio
- New Frame::GetAudioSamples arg, to allow for reversing the direction of audio samples
- Fix bug in Frame::AddAudioSilence() to correctly cache the # of audio samples
- FrameMapper clean up resample context (when changing frame rate)
- FrameMapper refactor to optimize # of calls to Reader()::GetFrame(), since calls to Clip::GetFrame are quite expensive
- Removing RepeatingFraction functionality from Keyframe object (since it was a bad implementation detail from our previous time remapping)
- Making Keyframe GetDelta method a float, and no longer an int - to allow for more precision on time remapping
- Large amount of white space fixing (to make things consistent)
2023-02-27 22:11:13 -06:00
FeRD (Frank Dana)
677ed5f591 Tests: Switch test files to openshot_catch.h 2022-06-17 15:37:51 -04:00
FeRD (Frank Dana)
59108504e3 Code changes for compatibility with JUCE 6.x
- Replace all juce::CriticalSection with std::recursive_mutex
- Replace all juce::AudioSampleBuffer with juce::AudioBuffer<float>
- Eliminate implicit reliance on 'using namespace juce;'
- Replace OpenShotAudio.h includes with targeted juce modules
2021-11-09 06:22:25 -05:00
Frank Dana
59138ea3e4 Adopt license management via Reuse project/tool (#711)
* reuse-managed license/copyright headers

reuse is a tool for compliance with the REUSE recommendations. See
<https://reuse.software/> for more information, and
<https://reuse.readthedocs.io/> for the online documentation.

* Set jsoncpp license
* Add MIT license for Decklink sources
* Explicitly license examples/
  - Add headers to source files
  - Change blanket licensing in .reuse/dep5 to only cover binary media
  - Import CC-BY-3.0 license and assign to sintel_trailer
2021-10-16 01:26:26 -04:00
Frank Dana
88d3011455 Unit tests: Use == to compare strings (#741)
When there's a mismatch, Catch2 will output the contents of both
strings rather than a meaningless .compare() numeric value.
2021-09-27 07:14:48 -04:00
FeRD (Frank Dana)
6a1579edd0 tests/KeyFrame: Tests for Print__() methods 2021-06-11 06:13:22 -04:00
Brenno
27eb0e6e23 Fixed Keyframe Test 2021-05-24 11:45:39 -03:00
Brenno
4d9d6ece9a Merge remote-tracking branch 'origin/develop' into effect-parenting 2021-04-21 13:34:49 -03:00
FeRD (Frank Dana)
89b1643e9f Tests: Shorten some crazy long test names 2021-04-19 17:25:06 -04:00
Brenno
2c9d2f2a32 OpenCV is again an optional dependency 2021-04-15 22:05:35 -03:00
Brenno
2cf2c55f9b Changed None to empty string, corrected dynamic pointers 2021-04-12 21:32:27 -03:00
Brenno
a7cefa4bd2 Removed namespaces, iostream library and added TrackedObject test 2021-04-12 21:22:58 -03:00
FeRD (Frank Dana)
d1d9293870 tests/KeyFrame: Split a CHECK(), for readability 2021-04-11 23:52:35 -04:00
Frank Dana
cd22b0681b tests/KeyFrame.cpp: Typo 2021-04-10 23:54:29 +00:00
Frank Dana
93306a42a8 tests/KeyFrame.cpp: Typo 2021-04-10 23:54:11 +00:00
FeRD (Frank Dana)
c8c92b5c5d Merge branch 'develop' into effect-parenting 2021-04-10 19:26:22 -04:00
FeRD (Frank Dana)
d9775d4a5e Port unit tests to Catch2 2021-04-09 04:09:36 -04:00
FeRD (Frank Dana)
c68b16643e Rename tests/*_Tests.cpp to tests/*.cpp 2021-04-07 23:41:04 -04:00