Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .github/workflows/build_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ jobs:

- name: Bootstrap vcpkg
shell: pwsh
run: ${{ github.workspace }}/vcpkg/bootstrap-vcpkg.bat
run: |
${{ github.workspace }}/vcpkg/bootstrap-vcpkg.bat
${{ env.VCPKG_EXE }} fetch nuget

- name: Add NuGet sources
shell: pwsh
Expand All @@ -64,12 +66,12 @@ jobs:
if("${{ matrix.libs }}" -eq "shared") {
$shared_libs = "ON"
} else {
$shared_libs = "ON"
$shared_libs = "OFF"
}
if("${{ matrix.fslib }}" -eq "boost") {
$use_boost = "ON"
} else {
$use_boost = "ON"
$use_boost = "OFF"
}
if("${{ matrix.arch }}" -eq "X64") {
$triplet = "x64-windows"
Expand Down
37 changes: 20 additions & 17 deletions src/api/include/projectM-4/parameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ PROJECTM_EXPORT void projectm_set_texture_search_paths(projectm_handle instance,
* If using this feature, it is further recommended to set the time to 0.0 on the first frame.
*
* @param instance The projectM instance handle.
* @param seconds_since_first_frame Any value >= 0 to use user-specified timestamps, values < 0 will use the system clock.
* @param seconds_since_first_frame Any value >= 0 to use user-specified timestamps, values < 0 will use the system clock. Default: -1.0
* @since 4.2.0
*/
PROJECTM_EXPORT void projectm_set_frame_time(projectm_handle instance, double seconds_since_first_frame);
Expand All @@ -87,7 +87,7 @@ PROJECTM_EXPORT double projectm_get_last_frame_time(projectm_handle instance);
* The beat sensitivity to be used.
*
* @param instance The projectM instance handle.
* @param sensitivity The sensitivity setting.
* @param sensitivity The sensitivity setting. Default: 1.0
* @since 4.0.0
*/
PROJECTM_EXPORT void projectm_set_beat_sensitivity(projectm_handle instance, float sensitivity);
Expand All @@ -109,7 +109,7 @@ PROJECTM_EXPORT float projectm_get_beat_sensitivity(projectm_handle instance);
* <p>Set this to a higher value than preset duration to disable hard cuts.</p>
*
* @param instance The projectM instance handle.
* @param seconds Minimum number of seconds the preset will be displayed before a hard cut.
* @param seconds Minimum number of seconds the preset will be displayed before a hard cut. Default: 20.0
* @since 4.0.0
*/
PROJECTM_EXPORT void projectm_set_hard_cut_duration(projectm_handle instance, double seconds);
Expand All @@ -129,7 +129,7 @@ PROJECTM_EXPORT double projectm_get_hard_cut_duration(projectm_handle instance);
* to work properly.
*
* @param instance The projectM instance handle.
* @param enabled True to enable hard cuts, false to disable.
* @param enabled True to enable hard cuts, false to disable. Default: false
* @since 4.0.0
*/
PROJECTM_EXPORT void projectm_set_hard_cut_enabled(projectm_handle instance, bool enabled);
Expand All @@ -148,7 +148,7 @@ PROJECTM_EXPORT bool projectm_get_hard_cut_enabled(projectm_handle instance);
* The beat detection volume difference that must be surpassed to trigger a hard cut.
*
* @param instance The projectM instance handle.
* @param sensitivity The volume threshold that triggers a hard cut if surpassed.
* @param sensitivity The volume threshold that triggers a hard cut if surpassed. Default: 2.0
* @since 4.0.0
*/
PROJECTM_EXPORT void projectm_set_hard_cut_sensitivity(projectm_handle instance, float sensitivity);
Expand All @@ -168,7 +168,7 @@ PROJECTM_EXPORT float projectm_get_hard_cut_sensitivity(projectm_handle instance
* to the other.
*
* @param instance The projectM instance handle.
* @param seconds Time in seconds it takes to smoothly transition from one preset to another.
* @param seconds Time in seconds it takes to smoothly transition from one preset to another. Default: 3.0
* @since 4.0.0
*/
PROJECTM_EXPORT void projectm_set_soft_cut_duration(projectm_handle instance, double seconds);
Expand All @@ -188,7 +188,7 @@ PROJECTM_EXPORT double projectm_get_soft_cut_duration(projectm_handle instance);
* a smooth cut will be initiated. A hard cut, if any, will always happen before this time.
*
* @param instance The projectM instance handle.
* @param seconds The number of seconds a preset will be displayed before the next is shown.
* @param seconds The number of seconds a preset will be displayed before the next is shown. Default: 30.0
* @since 4.0.0
*/
PROJECTM_EXPORT void projectm_set_preset_duration(projectm_handle instance, double seconds);
Expand All @@ -212,8 +212,8 @@ PROJECTM_EXPORT double projectm_get_preset_duration(projectm_handle instance);
* so only multiples of two are used.
*
* @param instance The projectM instance handle.
* @param width The new width of the mesh.
* @param height The new height of the mesh.
* @param width The new width of the mesh. Default: 32
* @param height The new height of the mesh. Default: 24
* @since 4.0.0
*/
PROJECTM_EXPORT void projectm_set_mesh_size(projectm_handle instance, size_t width, size_t height);
Expand All @@ -235,8 +235,8 @@ PROJECTM_EXPORT void projectm_get_mesh_size(projectm_handle instance, size_t* wi
* be configured externally to fix any possible drift.
*
* @param instance The projectM instance handle.
* @param offset_X The offset in texels in the horizontal direction. Milkdrop uses 0.5, default in projectM is 0.0.
* @param offset_y The offset in texels in the vertical direction. Milkdrop uses 0.5, default in projectM is 0.0.
* @param offset_X The offset in texels in the horizontal direction. Milkdrop uses 0.5. Default: 0.0
* @param offset_y The offset in texels in the vertical direction. Milkdrop uses 0.5. Default: 0.0
* @since 4.2.0
*/
PROJECTM_EXPORT void projectm_set_texel_offset(projectm_handle instance, float offset_X, float offset_y);
Expand All @@ -263,7 +263,7 @@ PROJECTM_EXPORT void projectm_get_texel_offset(projectm_handle instance, float*
* which may choose to use it for calculations. It is not used in any other way by the library.
*
* @param instance The projectM instance handle.
* @param fps The current FPS value projectM is running with.
* @param fps The current FPS value projectM is running with. Default: 35
* @since 4.0.0
*/
PROJECTM_EXPORT void projectm_set_fps(projectm_handle instance, int32_t fps);
Expand All @@ -286,7 +286,7 @@ PROJECTM_EXPORT int32_t projectm_get_fps(projectm_handle instance);
* be distorted if the viewport isn't exactly square.
*
* @param instance The projectM instance handle.
* @param enabled True to enable aspect correction, false to disable it.
* @param enabled True to enable aspect correction, false to disable it. Default: true
* @since 4.0.0
*/
PROJECTM_EXPORT void projectm_set_aspect_correction(projectm_handle instance, bool enabled);
Expand All @@ -309,7 +309,7 @@ PROJECTM_EXPORT bool projectm_get_aspect_correction(projectm_handle instance);
* <p>See function sampledPresetDuration() of the TimeKeeper class on how it is used.</p>
*
* @param instance The projectM instance handle.
* @param value The new "easter egg" value. Must be greater than zero, otherwise a default sigma value of 1.0 will be used.
* @param value The new "easter egg" value. Must be greater than zero, otherwise a default sigma value of 1.0 will be used. Default: 1.0
* @since 4.0.0
*/
PROJECTM_EXPORT void projectm_set_easter_egg(projectm_handle instance, float value);
Expand All @@ -329,7 +329,7 @@ PROJECTM_EXPORT float projectm_get_easter_egg(projectm_handle instance);
* preset switches will still be executed.
*
* @param instance The projectM instance handle.
* @param lock True to lock the current preset, false to enable automatic transitions.
* @param lock True to lock the current preset, false to enable automatic transitions. Default: false
* @since 4.0.0
*/
PROJECTM_EXPORT void projectm_set_preset_locked(projectm_handle instance, bool lock);
Expand All @@ -345,15 +345,18 @@ PROJECTM_EXPORT bool projectm_get_preset_locked(projectm_handle instance);
/**
* @brief Sets the current viewport size in pixels.
*
* This method must be called with a non-zero size for each dimension for projectM to render
* anything. The viewport size should be the same size or smaller as the surface being rendered to.
*
* The internal textures will only be replaced and resized when rendering the next frame and only
* if any of the two dimensions actually changed.
*
* Calling this function on every frame with the same size doesn't have any negative
* effects as it only updates the size with the same values.
*
* @param instance The projectM instance handle.
* @param width New viewport width in pixels.
* @param height New viewport height in pixels.
* @param width New viewport width in pixels. Default: 0
* @param height New viewport height in pixels. Default: 0
* @since 4.0.0
*/
PROJECTM_EXPORT void projectm_set_window_size(projectm_handle instance, size_t width, size_t height);
Expand Down
2 changes: 1 addition & 1 deletion src/libprojectM/Audio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ add_library(Audio OBJECT

target_include_directories(Audio
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/..
)

target_link_libraries(Audio
Expand Down
5 changes: 3 additions & 2 deletions src/libprojectM/Audio/FrameAudioData.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
*/
#pragma once

#include "projectM-4/projectM_export.h"
#include "AudioConstants.hpp"
#include "Audio/AudioConstants.hpp"

#include <projectM-4/projectM_export.h>

#include <array>

Expand Down
2 changes: 1 addition & 1 deletion src/libprojectM/Audio/Loudness.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "Loudness.hpp"
#include "Audio/Loudness.hpp"

#include <cmath>

Expand Down
2 changes: 1 addition & 1 deletion src/libprojectM/Audio/Loudness.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#pragma once

#include "AudioConstants.hpp"
#include "Audio/AudioConstants.hpp"

#include <array>
#include <cstdint>
Expand Down
2 changes: 1 addition & 1 deletion src/libprojectM/Audio/MilkdropFFT.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISI
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#include "MilkdropFFT.hpp"
#include "Audio/MilkdropFFT.hpp"

namespace libprojectM {
namespace Audio {
Expand Down
2 changes: 1 addition & 1 deletion src/libprojectM/Audio/PCM.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "PCM.hpp"
#include "Audio/PCM.hpp"

namespace libprojectM {
namespace Audio {
Expand Down
10 changes: 5 additions & 5 deletions src/libprojectM/Audio/PCM.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@

#pragma once

#include "AudioConstants.hpp"
#include "FrameAudioData.hpp"
#include "Loudness.hpp"
#include "MilkdropFFT.hpp"
#include "WaveformAligner.hpp"
#include "Audio/AudioConstants.hpp"
#include "Audio/FrameAudioData.hpp"
#include "Audio/Loudness.hpp"
#include "Audio/MilkdropFFT.hpp"
#include "Audio/WaveformAligner.hpp"

#include <projectM-4/projectM_export.h>

Expand Down
2 changes: 1 addition & 1 deletion src/libprojectM/Audio/WaveformAligner.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "WaveformAligner.hpp"
#include "Audio/WaveformAligner.hpp"

#include <algorithm>
#include <cmath>
Expand Down
2 changes: 1 addition & 1 deletion src/libprojectM/Audio/WaveformAligner.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#pragma once

#include "AudioConstants.hpp"
#include "Audio/AudioConstants.hpp"

#include <cstddef>
#include <cstdint>
Expand Down
3 changes: 0 additions & 3 deletions src/libprojectM/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ add_library(projectM_main OBJECT
PresetFactory.hpp
PresetFactoryManager.cpp
PresetFactoryManager.hpp
PresetFileParser.cpp
PresetFileParser.hpp
ProjectM.cpp
ProjectM.hpp
ProjectMCWrapper.cpp
Expand All @@ -30,7 +28,6 @@ add_library(projectM_main OBJECT
TimeKeeper.hpp
Utils.cpp
Utils.hpp
projectM-opengl.h
)

target_link_libraries(projectM_main
Expand Down
4 changes: 1 addition & 3 deletions src/libprojectM/MilkdropPreset/BlurTexture.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@
*/
#pragma once

#include "Renderer/Mesh.hpp"


#include <Renderer/Framebuffer.hpp>
#include <Renderer/Mesh.hpp>
#include <Renderer/RenderContext.hpp>
#include <Renderer/Shader.hpp>
#include <Renderer/TextureSamplerDescriptor.hpp>
Expand Down
2 changes: 2 additions & 0 deletions src/libprojectM/MilkdropPreset/Border.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "Border.hpp"

#include "PerFrameContext.hpp"

#include <Renderer/BlendMode.hpp>

namespace libprojectM {
Expand Down
1 change: 0 additions & 1 deletion src/libprojectM/MilkdropPreset/Border.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#pragma once

#include "PerFrameContext.hpp"
#include "PresetState.hpp"

#include <Renderer/Mesh.hpp>
Expand Down
2 changes: 2 additions & 0 deletions src/libprojectM/MilkdropPreset/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ add_library(MilkdropPreset OBJECT
PerPixelContext.hpp
PerPixelMesh.cpp
PerPixelMesh.hpp
PresetFileParser.cpp
PresetFileParser.hpp
PresetState.cpp
PresetState.hpp
ShapePerFrameContext.cpp
Expand Down
2 changes: 1 addition & 1 deletion src/libprojectM/MilkdropPreset/CustomShape.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ CustomShape::CustomShape(PresetState& presetState)
m_perFrameContext.RegisterBuiltinVariables();
}

void CustomShape::Initialize(::libprojectM::PresetFileParser& parsedFile, int index)
void CustomShape::Initialize(PresetFileParser& parsedFile, int index)
{
std::string const shapecodePrefix = "shapecode_" + std::to_string(index) + "_";

Expand Down
2 changes: 1 addition & 1 deletion src/libprojectM/MilkdropPreset/CustomShape.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class CustomShape
* @param parsedFile The file parser with the preset data.
* @param index The waveform index.
*/
void Initialize(::libprojectM::PresetFileParser& parsedFile, int index);
void Initialize(PresetFileParser& parsedFile, int index);

/**
* @brief Compiles all code blocks and runs the init expression.
Expand Down
7 changes: 3 additions & 4 deletions src/libprojectM/MilkdropPreset/CustomWaveform.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,15 @@

#include <Renderer/Color.hpp>
#include <Renderer/Mesh.hpp>
#include "Renderer/Point.hpp"
#include <Renderer/Point.hpp>

#include <vector>

namespace libprojectM {
namespace MilkdropPreset {

class PresetFileParser;

namespace MilkdropPreset {

class CustomWaveform
{
public:
Expand All @@ -30,7 +29,7 @@ class CustomWaveform
* @param parsedFile The file parser with the preset data.
* @param index The waveform index.
*/
void Initialize(::libprojectM::PresetFileParser& parsedFile, int index);
void Initialize(PresetFileParser& parsedFile, int index);

/**
* @brief Compiles all code blocks and runs the init expression.
Expand Down
6 changes: 3 additions & 3 deletions src/libprojectM/MilkdropPreset/MilkdropPreset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ void MilkdropPreset::Load(const std::string& pathname)

SetFilename(ParseFilename(pathname));

::libprojectM::PresetFileParser parser;
PresetFileParser parser;

if (!parser.Read(pathname))
{
Expand All @@ -223,7 +223,7 @@ void MilkdropPreset::Load(std::istream& stream)
{
LOG_DEBUG("[MilkdropPreset] Loading preset from stream.");

::libprojectM::PresetFileParser parser;
PresetFileParser parser;

if (!parser.Read(stream))
{
Expand All @@ -235,7 +235,7 @@ void MilkdropPreset::Load(std::istream& stream)
InitializePreset(parser);
}

void MilkdropPreset::InitializePreset(::libprojectM::PresetFileParser& parsedFile)
void MilkdropPreset::InitializePreset(PresetFileParser& parsedFile)
{
// Create the offscreen rendering surfaces.
m_motionVectorUVMap = std::make_shared<Renderer::TextureAttachment>(GL_RG16F, GL_RG, GL_FLOAT, 0, 0);
Expand Down
Loading
Loading