Skip to content

Commit

Permalink
Add MSVC support (#9)
Browse files Browse the repository at this point in the history
Co-authored-by: justnope <[email protected]>
Co-authored-by: Dan Giddins <[email protected]>
  • Loading branch information
3 people authored Jul 12, 2023
1 parent 188b751 commit aaea579
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 1 deletion.
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

0 comments on commit aaea579

Please sign in to comment.