Commit Graph

30 Commits

Author SHA1 Message Date
b88f96b780 Fix CMake scripts, so they can be used via add_subdirectory(). 2023-09-19 18:38:43 +02:00
5c5bb0a147 PresetFileParser: Fix line reader and a compiler warning, re-add tests.
Don't skip lines with no data after "=", as there are many presets with empty code lines. skipping it would create a gap in the line numbers, aborting the loop in GetCode() early.
2023-09-11 10:19:46 +02:00
29b3d4a463 Fix namespace issues in PCMTest.cpp 2023-09-11 10:19:46 +02:00
b9ef6a3974 Remove old expression parser and add the new projectm-eval lib.
Requires a general rewrite of the Milkdrop preset code. Previous implementation was tightly integrated into the code parser, so reusing this code wasn't possible. Additional refactoring was done, finished converting custom wave/shape implementations to use the new expression parser code.
2023-09-11 10:19:45 +02:00
dfe08a14bb Fix some errors in FileParser 2023-09-11 10:19:45 +02:00
7b2b60d61f Added a new preset file parser class.
Other changes:
- Renamed Parser to OldParser to make it clear this is going away.
- Removed all the useless "unit tests" which did not actually test anything.
- Added a new GTest-based test executable that can be run with CMake's CTest.
- Added unit tests for the new fileParser class, including test files.
2023-09-11 10:19:40 +02:00
c00d469081 Fix crash if playlist sort item count is out of bounds.
API docs say it's safe to pass out-of-bounds values, so it should behave in that way.
2023-03-23 10:48:07 +01:00
0940ec9532 Replace "-4.0" by "-4" 2023-02-22 16:34:46 +01:00
ede45f2e8c CMake: Replace "api/libprojectM/" by "api/projectM-4.0/" 2023-02-22 16:34:46 +01:00
139bd350fb Replace "#include <libprojectM/" by "#include <projectM-4.0/"
$ git grep -l 'include <libprojectM/' | xargs sed 's,include <libprojectM/,include <projectM-4.0/,' -i
2023-02-22 16:34:46 +01:00
1f33c810b3 Split up API headers into smaller, categorized files.
Also updated copyright and prefixed the render-related function with "opengl".
2023-01-18 12:57:57 +01:00
bac2a7ae12 Fix playlist tests on Windows.
Removed dependency on projectMtarget alltogether, as the playlist tests don't need the core library at all, only a few API functions which are mocked. Also made sure the mocked functions are declared as dllexport on Windows to match the dllimport declspec in the playlist library.
2023-01-17 18:55:29 +01:00
6e795ec632 Only build either shared or static projectM and playlist libraries.
Target name is now just libprojectM::projectM for the main library instead of libprojectM::static or libprojectM::shared.

Now using CMake's default mechanism to select the resulting library type via the BUILD_SHARED_LIBS variable. Main use case will be working with the shared library, which is the default.

Playlist library now also builds as a shared library, including proper symbol exports.

Additionally, deleted the leftover TestRunner class and a few old and rather useless test cases.

Also added LLVM find_package call and as a link dependency if the build is configured for using (experimental) LLVM code.

Reorganized tests to link either one of the object libraries for unit testing.
2023-01-13 11:16:27 +01:00
f2615a1745 Change projectm_playlist_items() method to return a given range of items. 2023-01-07 18:37:23 +01:00
4d54a511d1 Add projectm_playlist_get_shuffle() method to playlist API 2023-01-07 18:37:22 +01:00
62c4585cd7 Temporarily disable FFT low-frequency test.
Values don't match for some reason, need to investigate this later. Spectrum looks good, so it's probably the test implementation that's wrong here.
2022-12-30 14:44:06 +01:00
cddf1ec392 Temporarily disable FFT low-frequency test 2022-12-13 20:21:29 -06:00
710d228fcf Add libprojectM include path for tests, as it was removed in the library definition. 2022-12-06 15:02:40 +01:00
c4f24ba5e7 Fix tests on Windows, use correct filter syntax in projectMPlaylistPlaylist_ApplyFilter test. 2022-12-05 12:04:16 +01:00
42387a671b Add preset switched event formerly defined in projectM.h to playlist API 2022-12-04 21:54:29 +01:00
9ea98bf01e Add glob pattern filtering to playlist library.
Syntax is very similar to .gitignore glob syntax, with a few exceptions to simplify use.
2022-12-04 20:54:15 +01:00
a1ffd93e31 Add next/previous/last functions and playback history recording. 2022-11-26 23:47:04 +01:00
03f81ff36f Added more missing functions and tests to the playlist implementation. 2022-11-26 22:17:29 +01:00
7dcbe75db3 Added playback control methods and preset switching support. 2022-11-21 19:56:30 +01:00
7363afecc2 Add path scanning and sorting to the playlist implementation.
Path scanning is using C++17's std::filesystem if available, but uses boost::filesystem as fallback. Using boost can be forced using the ENABLE_BOOST_FILESYSTEM CMake option.
2022-11-21 19:54:57 +01:00
4dfae6bf22 Add test project for playlist library, implemented tests for existing code and fixed a few issues found by testing. 2022-11-21 19:54:57 +01:00
ebce27fbfb Move libprojectM tests into subdirectory. 2022-11-21 19:54:57 +01:00
0fe87a2c04 Moved Pcm class tests to the unit test project.
Added a helper function to reset autoleveler, made it public as might come in handy if there's a gap (pause/resume, new track etc.) in the audio data.
2022-04-14 15:59:06 +02:00
1769039b08 Deleted old "unit tests" which did nothing useful.
Note: This change alone will not configure properly as the test target has no code files.
2022-04-14 15:59:06 +02:00
9e9f4ca1b2 Removed all outsourced code/files from the repo and updated README.md with new links.
New subproject/data locations:
- presets/presets-cream_of_the_crop: https://github.com/projectM-visualizer/presets-cream-of-the-crop
- presets/presets-En_D: https://github.com/projectM-visualizer/presets-en-d
- presets/textures: https://github.com/projectM-visualizer/presets-milkdrop-texture-pack
- src/EyeTune: https://github.com/projectM-visualizer/frontend-uwp
- src/museum: https://github.com/projectM-visualizer/museum
- src/projectm-android: https://github.com/projectM-visualizer/examples-android
- src/projectM-emscripten: https://github.com/projectM-visualizer/examples-emscripten
- src/projectM-jack: https://github.com/projectM-visualizer/frontend-qt
- src/projectM-libvisual: https://github.com/projectM-visualizer/frontend-libvisual-plug-in
- src/projectM-libvisual-alsa: Deleted.
- src/projectM-moviegen: https://github.com/projectM-visualizer/tools-moviegen
- src/projectM-MusicPlugin: https://github.com/projectM-visualizer/frontend-music-plug-in
- src/projectM-pulseaudio: https://github.com/projectM-visualizer/frontend-qt
- src/projectM-qt: https://github.com/projectM-visualizer/frontend-qt
- src/projectM-sdl: src/sdl-test-ui
- src/projectM-test: tests
2022-02-18 18:01:03 +01:00