Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MSVC support #9

Merged
merged 4 commits into from
Jul 12, 2023
Merged
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
5 changes: 5 additions & 0 deletions src/analyzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ using namespace calf_plugins;
#define sinc(x) (x == 0) ? 1 : sin(M_PI * x)/(M_PI * x);
#define RGBAtoINT(r, g, b, a) ((uint32_t)(r * 255) << 24) + ((uint32_t)(g * 255) << 16) + ((uint32_t)(b * 255) << 8) + (uint32_t)(a * 255)

#ifndef M_PI
#define M_PI 3.14159265358979323846264338327
#endif


analyzer::analyzer() {
_accuracy = -1;
_acc = -1;
Expand Down
8 changes: 8 additions & 0 deletions src/audio_fx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@
using namespace calf_plugins;
using namespace dsp;

#ifndef M_PI
#define M_PI 3.14159265358979323846264338327
#endif

#ifndef M_PI_2
# define M_PI_2 1.57079632679489661923 /* pi/2 */
#endif

simple_phaser::simple_phaser(int _max_stages, float *x1vals, float *y1vals)
{
max_stages = _max_stages;
Expand Down
4 changes: 4 additions & 0 deletions src/calf/biquad.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
#include <complex>
#include "primitives.h"

#ifndef M_PI
#define M_PI 3.14159265358979323846264338327
#endif

namespace dsp {

/**
Expand Down
5 changes: 5 additions & 0 deletions src/calf/loudness.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@

#include "biquad.h"

#ifndef M_PI
#define M_PI 3.14159265358979323846264338327
#endif


namespace dsp {

class aweighter {
Expand Down
5 changes: 5 additions & 0 deletions src/calf/primitives.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@
#include <map>
#include <algorithm>

#ifndef M_PI
#define M_PI 3.14159265358979323846264338327
#endif


namespace dsp {

/// Set a float to zero
Expand Down
4 changes: 4 additions & 0 deletions src/modules_dist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ using namespace calf_plugins;

#define SET_IF_CONNECTED(name) if (params[AM::param_##name] != NULL) *params[AM::param_##name] = name;

#ifndef M_PI
#define M_PI 3.14159265358979323846264338327
#endif

/**********************************************************************
* SATURATOR by Markus Schmidt
**********************************************************************/
Expand Down
1 change: 0 additions & 1 deletion src/veal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,6 @@ const LV2_Descriptor *lv2_descriptor(uint32_t index)

#if USE_LADSPA
extern "C" {

const LADSPA_Descriptor *ladspa_descriptor(unsigned long Index)
{
#define PER_MODULE_ITEM(name, isSynth, jackname) if (!isSynth && !(Index--)) return &ladspa_wrapper<name##_audio_module>::get().descriptor;
Expand Down