Skip to content

Commit

Permalink
Include cleanup, plus a few small code improvements.
Browse files Browse the repository at this point in the history
Also removed empty FrameAudioData implementation file.
  • Loading branch information
kblaschke committed Feb 1, 2024
1 parent 7667a98 commit a8c41f5
Show file tree
Hide file tree
Showing 53 changed files with 86 additions and 155 deletions.
1 change: 0 additions & 1 deletion src/libprojectM/Audio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ add_library(Audio OBJECT
AudioConstants.hpp
MilkdropFFT.cpp
MilkdropFFT.hpp
FrameAudioData.cpp
FrameAudioData.hpp
PCM.cpp
PCM.hpp
Expand Down
7 changes: 0 additions & 7 deletions src/libprojectM/Audio/FrameAudioData.cpp

This file was deleted.

2 changes: 0 additions & 2 deletions src/libprojectM/Audio/PCM.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#include "PCM.hpp"

#include <cassert>

namespace libprojectM {
namespace Audio {

Expand Down
2 changes: 1 addition & 1 deletion src/libprojectM/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ if(ENABLE_INSTALL)
else()
# Set PROJECTM_STATIC_EXPORT for C++ implementations to use project default visibility
# and no dllimport/dllexport.
set_source_files_properties(ProjectM.cpp Audio/PCM.cpp Audio/FrameAudioData.cpp PROPERTIES
set_source_files_properties(ProjectM.cpp Audio/PCM.cpp PROPERTIES
COMPILE_DEFINITIONS PROJECTM_STATIC_DEFINE
)
target_compile_definitions(projectM
Expand Down
1 change: 0 additions & 1 deletion src/libprojectM/MilkdropPreset/BlurTexture.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "BlurTexture.hpp"

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

#include "MilkdropStaticShaders.hpp"

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

#include <glm/gtc/type_ptr.hpp>

namespace libprojectM {
namespace MilkdropPreset {

Expand Down
2 changes: 0 additions & 2 deletions src/libprojectM/MilkdropPreset/Constants.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
*/
#pragma once

#include <Audio/AudioConstants.hpp>

namespace libprojectM {
namespace MilkdropPreset {

Expand Down
4 changes: 1 addition & 3 deletions src/libprojectM/MilkdropPreset/CustomShape.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

#include "PresetFileParser.hpp"

#include "Renderer/TextureManager.hpp"

#include <glm/gtc/type_ptr.hpp>
#include <Renderer/TextureManager.hpp>

#include <vector>

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 @@ -4,7 +4,7 @@
#include "PresetState.hpp"
#include "ShapePerFrameContext.hpp"

#include "Renderer/RenderItem.hpp"
#include <Renderer/RenderItem.hpp>

#include <projectm-eval.h>

Expand Down
6 changes: 0 additions & 6 deletions src/libprojectM/MilkdropPreset/CustomWaveform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,7 @@

#include "PerFrameContext.hpp"
#include "PresetFileParser.hpp"
#include "projectM-opengl.h"

#include <glm/gtc/type_ptr.hpp>

#ifdef _WIN32
#include <functional>
#endif /** _WIN32 */
#include <algorithm>
#include <cmath>

Expand Down
2 changes: 1 addition & 1 deletion src/libprojectM/MilkdropPreset/CustomWaveform.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "WaveformPerFrameContext.hpp"
#include "WaveformPerPointContext.hpp"

#include "Renderer/RenderItem.hpp"
#include <Renderer/RenderItem.hpp>

#include <vector>

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

#include "PresetState.hpp"

#include "Renderer/RenderItem.hpp"
#include <Renderer/RenderItem.hpp>

namespace libprojectM {
namespace MilkdropPreset {
Expand Down
14 changes: 1 addition & 13 deletions src/libprojectM/MilkdropPreset/Factory.cpp
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
//
// C++ Implementation: MilkdropPresetFactory
//
// Description:
//
//
// Author: Carmelo Piccione <carmelo.piccione@gmail.com>, (C) 2008
//
// Copyright: See COPYING file that comes with this distribution
//
//
//
#include "Factory.hpp"

#include "IdlePreset.hpp"
Expand All @@ -22,7 +10,7 @@ std::unique_ptr<::libprojectM::Preset> Factory::LoadPresetFromFile(const std::st
{
std::string path;
auto protocol = PresetFactory::Protocol(filename, path);
if (protocol == PresetFactory::IDLE_PRESET_PROTOCOL)
if (protocol == "idle")
{
return IdlePresets::allocate();
}
Expand Down
2 changes: 0 additions & 2 deletions src/libprojectM/MilkdropPreset/Filters.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#include "Filters.hpp"

#include "projectM-opengl.h"

namespace libprojectM {
namespace MilkdropPreset {

Expand Down
4 changes: 4 additions & 0 deletions src/libprojectM/MilkdropPreset/FinalComposite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

#include <cstddef>

#ifdef MILKDROP_PRESET_DEBUG
#include <iostream>
#endif

namespace libprojectM {
namespace MilkdropPreset {

Expand Down
2 changes: 2 additions & 0 deletions src/libprojectM/MilkdropPreset/IdlePreset.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "IdlePreset.hpp"

#include "MilkdropPreset.hpp"

#include <sstream>
#include <string>

Expand Down
5 changes: 3 additions & 2 deletions src/libprojectM/MilkdropPreset/MilkdropShader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
#pragma once

#include "BlurTexture.hpp"
#include "Renderer/Shader.hpp"
#include "Renderer/TextureManager.hpp"

#include <Renderer/Shader.hpp>
#include <Renderer/TextureManager.hpp>

#include <array>
#include <set>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "MilkdropStaticShaders.hpp"

#include "projectM-opengl.h"
#include <projectM-opengl.h>

#include <cstring>
#include <stdexcept>
Expand Down
4 changes: 2 additions & 2 deletions src/libprojectM/MilkdropPreset/MilkdropStaticShaders.hpp.in
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#pragma once

#include "GLSLGenerator.h"
#include <GLSLGenerator.h>

#include "Renderer/Shader.hpp"
#include <Renderer/Shader.hpp>

#include <memory>

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

#include <MilkdropStaticShaders.hpp>
#include "MilkdropStaticShaders.hpp"

#include <Renderer/TextureManager.hpp>

Expand Down
2 changes: 1 addition & 1 deletion src/libprojectM/MilkdropPreset/MotionVectors.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "PerFrameContext.hpp"
#include "PresetState.hpp"

#include "Renderer/RenderItem.hpp"
#include <Renderer/RenderItem.hpp>

#include <memory>

Expand Down
7 changes: 5 additions & 2 deletions src/libprojectM/MilkdropPreset/PerPixelMesh.cpp
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
#include "PerPixelMesh.hpp"

#include "MilkdropShader.hpp"
#include "MilkdropStaticShaders.hpp"
#include "PerFrameContext.hpp"
#include "PerPixelContext.hpp"
#include "PresetState.hpp"

#include <MilkdropStaticShaders.hpp>

#include <algorithm>
#include <cmath>

#ifdef MILKDROP_PRESET_DEBUG
#include <iostream>
#endif

namespace libprojectM {
namespace MilkdropPreset {

Expand Down
3 changes: 2 additions & 1 deletion src/libprojectM/MilkdropPreset/PresetState.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#include "PresetState.hpp"

#include "MilkdropStaticShaders.hpp"
#include "PresetFileParser.hpp"

#include <MilkdropStaticShaders.hpp>
#include <glm/gtc/matrix_transform.hpp>

#include <random>

Expand Down
2 changes: 0 additions & 2 deletions src/libprojectM/MilkdropPreset/PresetState.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@

#include <projectm-eval.h>

#include <glm/gtc/matrix_transform.hpp>

#include <string>

namespace libprojectM {
Expand Down
2 changes: 0 additions & 2 deletions src/libprojectM/MilkdropPreset/VideoEcho.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#include "VideoEcho.hpp"

#include <glm/gtc/type_ptr.hpp>

namespace libprojectM {
namespace MilkdropPreset {

Expand Down
2 changes: 1 addition & 1 deletion src/libprojectM/MilkdropPreset/VideoEcho.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "PerFrameContext.hpp"
#include "PresetState.hpp"

#include "projectM-opengl.h"
#include <projectM-opengl.h>

#include <Renderer/RenderItem.hpp>

Expand Down
4 changes: 2 additions & 2 deletions src/libprojectM/MilkdropPreset/Waveform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

#include "Waveforms/Factory.hpp"

#include "projectM-opengl.h"
#include <projectM-opengl.h>

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

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

#include "Waveforms/WaveformMath.hpp"

#include "Renderer/RenderItem.hpp"
#include <Renderer/RenderItem.hpp>

#include <memory>
#include <vector>
Expand Down
2 changes: 2 additions & 0 deletions src/libprojectM/MilkdropPreset/Waveforms/CenteredSpiro.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "CenteredSpiro.hpp"

#include <Audio/AudioConstants.hpp>

namespace libprojectM {
namespace MilkdropPreset {
namespace Waveforms {
Expand Down
2 changes: 2 additions & 0 deletions src/libprojectM/MilkdropPreset/Waveforms/LineBase.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "LineBase.hpp"

#include <Audio/AudioConstants.hpp>

#include <cmath>

namespace libprojectM {
Expand Down
9 changes: 5 additions & 4 deletions src/libprojectM/Preset.hpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#pragma once

#include "Audio/FrameAudioData.hpp"
#include <Audio/FrameAudioData.hpp>

#include "Renderer/RenderContext.hpp"
#include "Renderer/Texture.hpp"
#include <Renderer/RenderContext.hpp>
#include <Renderer/Texture.hpp>

#include <memory>
#include <string>

namespace libprojectM {
Expand Down Expand Up @@ -51,7 +52,7 @@ class Preset
m_filename = filename;
}

inline const std::string& Filename() const
inline auto Filename() const -> const std::string&
{
return m_filename;
}
Expand Down
2 changes: 0 additions & 2 deletions src/libprojectM/PresetFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

namespace libprojectM {

const std::string PresetFactory::IDLE_PRESET_PROTOCOL("idle");

std::string PresetFactory::Protocol(const std::string& url, std::string& path)
{
auto pos = url.find("://");
Expand Down
2 changes: 0 additions & 2 deletions src/libprojectM/PresetFactory.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ class PresetFactory
{

public:
static const std::string IDLE_PRESET_PROTOCOL; //!< The string "idle"

PresetFactory() = default;

virtual ~PresetFactory() = default;
Expand Down
11 changes: 0 additions & 11 deletions src/libprojectM/PresetFactoryManager.cpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
//
// C++ Implementation: PresetFactoryManager
//
// Description:
//
//
// Author: Carmelo Piccione <carmelo.piccione@gmail.com>, (C) 2008
//
// Copyright: See COPYING file that comes with this distribution
//
//
#include "PresetFactoryManager.hpp"

#include <MilkdropPreset/Factory.hpp>
Expand Down
10 changes: 5 additions & 5 deletions src/libprojectM/ProjectM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@
#include "PresetFactoryManager.hpp"
#include "TimeKeeper.hpp"

#include "Audio/PCM.hpp" //Sound data handler (buffering, FFT, etc.)
#include <Audio/PCM.hpp>

#include "Renderer/CopyTexture.hpp"
#include "Renderer/PresetTransition.hpp"
#include "Renderer/TextureManager.hpp"
#include "Renderer/TransitionShaderManager.hpp"
#include <Renderer/CopyTexture.hpp>
#include <Renderer/PresetTransition.hpp>
#include <Renderer/TextureManager.hpp>
#include <Renderer/TransitionShaderManager.hpp>

namespace libprojectM {

Expand Down
Loading

0 comments on commit a8c41f5

Please sign in to comment.