Browse Source

Fix build with new juce

tags/1.9.4
falkTX 11 years ago
parent
commit
9a6d7dff39
3 changed files with 21 additions and 5 deletions
  1. +6
    -4
      source/backend/engine/CarlaEngineJuce.cpp
  2. +14
    -0
      source/modules/juce_audio_processors/AppConfig.h
  3. +1
    -1
      source/modules/juce_audio_processors/Makefile

+ 6
- 4
source/backend/engine/CarlaEngineJuce.cpp View File

@@ -667,12 +667,13 @@ const EngineDriverDeviceInfo* CarlaEngine::getJuceDeviceInfo(const unsigned int
if (device->hasControlPanel())
devInfo.hints |= ENGINE_DRIVER_DEVICE_HAS_CONTROL_PANEL;

if (int bufferSizesCount = device->getNumBufferSizesAvailable())
Array<int> juceBufferSizes = device->getAvailableBufferSizes();
if (int bufferSizesCount = juceBufferSizes.size())
{
uint32_t* const bufferSizes(new uint32_t[bufferSizesCount+1]);

for (int i=0; i < bufferSizesCount; ++i)
bufferSizes[i] = static_cast<uint32_t>(device->getBufferSizeSamples(i));
bufferSizes[i] = static_cast<uint32_t>(juceBufferSizes[i]);
bufferSizes[bufferSizesCount] = 0;

devInfo.bufferSizes = bufferSizes;
@@ -682,12 +683,13 @@ const EngineDriverDeviceInfo* CarlaEngine::getJuceDeviceInfo(const unsigned int
devInfo.bufferSizes = dummyBufferSizes;
}

if (int sampleRatesCount = device->getNumSampleRates())
Array<double> juceSampleRates = device->getAvailableSampleRates();
if (int sampleRatesCount = juceSampleRates.size())
{
double* const sampleRates(new double[sampleRatesCount+1]);

for (int i=0; i < sampleRatesCount; ++i)
sampleRates[i] = device->getSampleRate(i);
sampleRates[i] = juceSampleRates[i];
sampleRates[sampleRatesCount] = 0.0;

devInfo.sampleRates = sampleRates;


+ 14
- 0
source/modules/juce_audio_processors/AppConfig.h View File

@@ -21,6 +21,18 @@
*/
#define JUCE_PLUGINHOST_VST 1
/** Config: JUCE_PLUGINHOST_VST3
Enables the VST3 audio plugin hosting classes. This requires the Steinberg VST3 SDK to be
installed on your machine.
@see VSTPluginFormat, VVST3PluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_VST, JUCE_PLUGINHOST_AU
*/
#if defined(JUCE_WINDOW) || defined(JUCE_MAC)
# define JUCE_PLUGINHOST_VST3 1
#else
# define JUCE_PLUGINHOST_VST3 0
#endif
/** Config: JUCE_PLUGINHOST_AU
Enables the AudioUnit plugin hosting classes. This is Mac-only, of course.
@@ -28,4 +40,6 @@
*/
#define JUCE_PLUGINHOST_AU 1
#define JUCE_PLUGINHOST_LADSPA 1
#endif // CARLA_JUCE_AUDIO_PROCESSORS_APPCONFIG_H_INCLUDED

+ 1
- 1
source/modules/juce_audio_processors/Makefile View File

@@ -8,7 +8,7 @@ include ../../Makefile.mk

# --------------------------------------------------------------

BUILD_CXX_FLAGS += $(JUCE_AUDIO_PROCESSORS_FLAGS) -I. -I../../includes/vst -w
BUILD_CXX_FLAGS += $(JUCE_AUDIO_PROCESSORS_FLAGS) -I. -I../../includes/vst -I../../includes/vst3 -w
LINK_FLAGS += $(JUCE_AUDIO_PROCESSORS_LIBS) -L.. -ljuce_audio_basics -ljuce_gui_basics -ljuce_graphics -ljuce_data_structures -ljuce_events -ljuce_core

ifeq ($(MACOS),true)


Loading…
Cancel
Save