Browse Source

Fix windows build

tags/1.9.7
falkTX 9 years ago
parent
commit
8deb54f77b
5 changed files with 25 additions and 13 deletions
  1. +5
    -7
      source/modules/juce_audio_devices/native/juce_win32_ASIO.cpp
  2. +8
    -1
      source/modules/juce_core/AppConfig.h
  3. +5
    -2
      source/native-plugins/zynaddsubfx-src.cpp
  4. +4
    -0
      source/native-plugins/zynaddsubfx/Misc/Bank.cpp
  5. +3
    -3
      source/native-plugins/zynaddsubfx/Synth/Resonance.cpp

+ 5
- 7
source/modules/juce_audio_devices/native/juce_win32_ASIO.cpp View File

@@ -1416,15 +1416,13 @@ private:
}
};
template <>
struct ASIOCallbackFunctions <sizeof(currentASIODev) / sizeof(currentASIODev[0])>
{
static void setCallbacksForDevice (ASIOCallbacks&, ASIOAudioIODevice*) noexcept {}
};
void setCallbackFunctions() noexcept
{
ASIOCallbackFunctions<0>::setCallbacksForDevice (callbacks, this);
/**/ if (currentASIODev[0] == this) ASIOCallbackFunctions<0>::setCallbacks (callbacks);
else if (currentASIODev[1] == this) ASIOCallbackFunctions<1>::setCallbacks (callbacks);
else if (currentASIODev[2] == this) ASIOCallbackFunctions<2>::setCallbacks (callbacks);
else if (currentASIODev[3] == this) ASIOCallbackFunctions<3>::setCallbacks (callbacks);
else jassertfalse;
}
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ASIOAudioIODevice)


+ 8
- 1
source/modules/juce_core/AppConfig.h View File

@@ -65,10 +65,16 @@
*/
#define JUCE_CATCH_UNHANDLED_EXCEPTIONS 0
// misc
#define JUCE_DISABLE_JUCE_VERSION_PRINTING 1
#define JUCE_STANDALONE_APPLICATION 0
#define JUCE_STRING_UTF_TYPE 8
#define JUCE_USE_VFORK 1
// not used/wanted
#define JUCE_USE_XRANDR 0
#define JUCE_USE_XINERAMA 0
#if ! (JUCE_MAC || JUCE_WINDOWS)
# define JUCE_MODAL_LOOPS_PERMITTED 0
# define JUCE_AUDIO_PROCESSOR_NO_GUI 1
@@ -80,6 +86,7 @@
#define JUCE_MODULE_AVAILABLE_juce_core 1
// always disabled
#define JUCE_MODULE_AVAILABLE_juce_audio_plugin_client 0
#define JUCE_MODULE_AVAILABLE_juce_audio_utils 0
#define JUCE_MODULE_AVAILABLE_juce_cryptography 0
#define JUCE_MODULE_AVAILABLE_juce_opengl 0


+ 5
- 2
source/native-plugins/zynaddsubfx-src.cpp View File

@@ -18,8 +18,11 @@
#include "CarlaDefines.h"

#ifdef CARLA_OS_WIN
# define errx(...)
# define warnx(...)
# include <cmath>
# define errx(...) {}
# define warnx(...) {}
# define rindex strrchr
using std::isnan;
#else
# include <err.h>
#endif


+ 4
- 0
source/native-plugins/zynaddsubfx/Misc/Bank.cpp View File

@@ -288,7 +288,11 @@ int Bank::newbank(string newbankdirname)
bankdir += "/";

bankdir += newbankdirname;
#ifdef _WIN32
if(mkdir(bankdir.c_str()) < 0)
#else
if(mkdir(bankdir.c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH) < 0)
#endif
return -1;

const string tmpfilename = bankdir + '/' + FORCE_BANK_DIR_FILE;


+ 3
- 3
source/native-plugins/zynaddsubfx/Synth/Resonance.cpp View File

@@ -98,11 +98,11 @@ void Resonance::applyres(int n, fft_t *fftdata, float freq) const

//Provide an upper bound for resonance
const float upper =
limit<float>(array_max(Prespoints, N_RES_POINTS), 1.0f, INFINITY);
limit<float>(array_max(Prespoints, N_RES_POINTS), 1.0f, (float)INFINITY);

for(int i = 1; i < n; ++i) {
//compute where the n-th hamonics fits to the graph
const float x = limit((logf(freq*i) - l1) / l2, 0.0f, INFINITY) * N_RES_POINTS;
const float x = limit((logf(freq*i) - l1) / l2, 0.0f, (float)INFINITY) * N_RES_POINTS;
const float dx = x - floor(x);
const int kx1 = limit<int>(floor(x), 0, N_RES_POINTS - 1);
const int kx2 = limit<int>(kx1 + 1, 0, N_RES_POINTS - 1);
@@ -136,7 +136,7 @@ float Resonance::getfreqresponse(float freq) const
limit<float>(array_max(Prespoints, N_RES_POINTS), 1.0f, INFINITY);

//compute where the n-th hamonics fits to the graph
const float x = limit((logf(freq) - l1) / l2, 0.0f, INFINITY) * N_RES_POINTS;
const float x = limit((logf(freq) - l1) / l2, 0.0f, (float)INFINITY) * N_RES_POINTS;
const float dx = x - floor(x);
const int kx1 = limit<int>(floor(x), 0, N_RES_POINTS - 1);
const int kx2 = limit<int>(kx1 + 1, 0, N_RES_POINTS - 1);


Loading…
Cancel
Save