Commit Graph

2761 Commits

Author SHA1 Message Date
bd592bdb2e Rename WaveformAligner variables to be clearer, add comments 2024-02-06 07:58:32 -06:00
7c425f7469 WaveformAligner type refactor 2024-02-06 07:58:32 -06:00
0beb7a2d09 Relocated dll's to PROJECTM_BIN_DIR on Windows 2024-02-02 10:21:25 -06:00
60e5607877 Fixed a bug in TextureManager, failed to load textures if prefixes (fw_...) were used. 2024-02-02 15:08:05 +01:00
a1d300f48c Include cleanup, plus a few small code improvements.
Also removed empty FrameAudioData implementation file.
2024-02-02 15:08:05 +01:00
27f3308ac3 Remove utterly useless multithreading switch
Since we're using OpenGL, everything has to be done in the same thread anyways. Besides that, the actual "multithreading" implementation was basically starting an empty thread that did absolutely nothing, then wait synchronously for it to complete and join it on the next frame.
2024-02-02 15:08:04 +01:00
184766b2c8 pkgconfig fixes 2024-02-02 15:08:04 +01:00
e018854619 Silence OpenGL deprecation warnings on macOS.
Nothing we can do about that in the short term. We might support Metal (eventually via MetalVK) in a future version.
2024-02-02 15:08:04 +01:00
df48f1bb07 Remove RandomNumberGenerators.hpp and replace the only invocation with std::normal_distribution 2024-02-02 15:08:04 +01:00
0789c54404 Remove unnecessary feature detections, move filesystem defines to config.h. 2024-02-02 15:08:04 +01:00
c2f2e7a0d3 Deleted useless .gitignore file.
Most files ignored were no longer in the repository, and the rest is already covered by the top-level .gitignore file.
2024-02-02 15:08:04 +01:00
170f054860 Remove no longer used LLVM support code. 2024-02-02 15:08:04 +01:00
1513675c31 Remove no longer used omptl and OpenMP support.
Fixup: remove omtpl
2024-02-02 15:08:04 +01:00
72cd63d507 Updated actions across all workflows 2024-02-01 20:43:45 -06:00
7e45cbe1f9 Clean up minor warnings and code style
* Remove warnings for code in vendor folders
* Add pedantic and extra warnings in GCC only to projectM sources
* Rename ResetOpenGL to SetWindowSize
2024-02-01 11:27:10 -06:00
3fc7c9dd2f Replace low-level FS API with std:: or boost::filesystem.
Also gets rid of the dirent.h hack used on Windows platforms, as the filesystem API hides all the OS-specific stuff, and we can use a recursive iterator instead of doing that ourselves, making the code even cleaner.
2024-01-30 15:25:29 +01:00
3cba474888 Move filesystem support check to top level CMakeLists.txt
Preparing to replace the low-level POSIX API usage in FileScanner.cpp.
2024-01-30 14:43:10 +01:00
fbb74ccd0b Fix a buffer overrun in PCM::GetFrameAudioData().
This did not have any real impact, as the excess bytes were written into the next buffer, which was then immediately "fixed up" during the following copy call with the correct data, but could cause a crash and other nasty things if someone would reorder the class members or insert something in between.
2024-01-30 10:54:16 +01:00
2c5a763dc1 Pass optional dependency on Boost::filesystem to downstream projects. 2024-01-19 11:57:06 +01:00
6e93c1f624 Consolidate USE_GLES define usage. 2024-01-19 11:57:06 +01:00
4a89b5fc85 Added precision specifier for sampler3D.
This sampler type is not covered by the default precision specifier, so we have to add it.
2024-01-19 11:57:06 +01:00
3c2fccc7eb Added documentation for Emscripten 2024-01-19 11:57:06 +01:00
d7d72bc77c Add float precision to transition shader headers.
This is required by OpenGL ES, as it has no default precision set.
2024-01-19 11:57:06 +01:00
bbb715a844 Update projectm-eval submodule where another memory leak was fixed. 2024-01-19 11:57:06 +01:00
484c3579d7 Fix a memory leak in HLSLMacro class due to use of std::string.
The HLSLMacro struct is manually malloc'd, not using new/delete, so the std::string destructor is never called on the instance stored in the class.

Fixed by using a char* allocated by HLSLTree, which will then properly take care of deleting it after parsing is complete.
2024-01-19 11:57:06 +01:00
7cb79fe5b5 Improve robustness and fix leaking of hlslparser's Array memory management. 2024-01-19 11:57:06 +01:00
04bf637aa1 Make X wave rotatable via "mystery" wave parameter.
Addition from Incubo's BeatDrop code.
2023-12-30 15:07:05 +01:00
37352ee667 Added additional test presets for the waveform modes. 2023-12-30 14:56:35 +01:00
74ed428430 Added seven additional waveform modes from Milkdrop 3
Waveform code was kindly provided and used with permission by Milkdrop2077.

Had to make a few amends though, as some sample offsets went over the allocated waveform sample count (>480), leading to memory issues.
2023-12-30 14:56:35 +01:00
1350028430 Move default waveform math to separate classes.
Gets rid of this hube WaveformMath() function and provides a framework to easily add more wave modes.
2023-12-30 14:56:35 +01:00
9762297909 Properly namespace all classes under "::libprojectM" 2023-12-30 14:56:35 +01:00
39605b645a Fixed a few compiler warnings. 2023-12-30 14:56:35 +01:00
b9eae98279 Added line in .gitignore to avoid pushing dependencies installed via vcpkg 2023-12-29 22:28:30 +01:00
0dfefc2fa4 Fixed Windows build with latest SDK
Made changes to pmSDL.hpp in order to fix build errors related to order of included Windows libraries.
2023-12-29 22:27:48 +01:00
2911adfb40 Moved build-gtest to the projectm namespace 2023-12-27 16:30:37 -06:00
102aef23e0 Update emsdk version to current release 3.1.51 2023-12-27 16:30:37 -06:00
150436b381 Update mymindstorm/setup-emsdk GitHub Action to v13 2023-12-27 16:30:37 -06:00
9b03314d19 Fix generator expressions showing up in pkgconfig files
Instead of using these expressions, adding "lib" in fron of static libs is now done via CMAKE_STATIC_LIBRARY_PREFIX when building static libs on Windows.
2023-11-26 13:52:10 +01:00
1e0f8c6b10 Fix position of headphones in idle preset.
Now that everything renders in the right orientation, the idle preset's headphones coordinates were a bit off, rendering at the bottom of the M logo.
2023-11-25 14:44:45 +01:00
b85b631c68 Fix shading language version detection when using WebGL
WebGL doesn't follow the OpenGL standard format for the glGetString(GL_SHADING_LANGUAGE_VERSION) return value. Chrome for example will return "OpenGL ES GLSL ES 3.00 (WebGL GLSL ES 3.00 (OpenGL ES GLSL ES 3.0 Chromium))", which does not start with the version number as the standard suggests.

This fix will simply cut off any text preceding the first digit found in the string, if any.
2023-11-25 03:36:53 +01:00
9c68339d1d Fixed some Doxygen comments in the audio headers. 2023-11-24 23:51:10 +01:00
cf7d08c2ff Consolidate how update methods are called.
Directly passing references to the affected members is easier to read in the main UpdateFrameAudioData() method.
2023-11-24 21:00:40 +01:00
f7f7f96638 Fix upper bound of frequency band calculation.
The "+1" somehow disappeared at some point...
2023-11-24 21:00:40 +01:00
36fb09ce30 Implemented waveform alignment algorithm.
Also consolidated the waveform sample count constant to keep it aligned over all classes.
2023-11-24 21:00:40 +01:00
69d2134fa2 Rewrite of audio data processing/beat detection.
Consolidated audio processing code into the PCM class, removing the BeatDetect class in the process. Beat detection now uses the same algorithm as Milkdrop, passing the proper relative bass/mid/treb values to presets. Makes many presets look less jumpy/flickering, as the values are now (smoothly) alternating around 1.0.

Updating frame audio is now done in a function that must specifically be called. Any subsequent calls to GetFrameAudioData() will then return the exact same copy of the audio data. As of now with the exception that new waveform data may be passed in via a separate thread, which will then be returned and might not match the spectrum data. Will fix that in a later commit.
2023-11-24 21:00:39 +01:00
045b05fa95 Replaced FFT implementation.
Removed the previous FFT algorithm, now using a modernized version of the original Milkdrop FFT transform which also has both an equalizer and frequency envelope, making it slightly more sophisticated.

Modernization mainly included replacing raw pointer arrays with std::vector and using STL types/functions for the calculation, specifically std::complex as the FFT heavily uses these numbers. This makes the code more compact and readable.

Manually tested both original and modernized versions of the class to test if the algorithm still returns the exact same results, which is the case.
2023-11-24 21:00:35 +01:00
2f14cc1972 Updated 'Windows' section of the BUILDING docs 2023-11-16 15:01:37 -06:00
4b6421b168 Added gtest to vcpkg dependencies 2023-11-16 15:01:37 -06:00
42edc62ea1 Remove dependency install from Windows github action 2023-11-16 15:01:37 -06:00
0c86ed25ef Added vcpkg configuration. Contributor: @insel-maz 2023-11-16 15:01:37 -06:00