Skip to content

Commit

Permalink
Build: Fix Xcode 11.4 compatibility issues
Browse files Browse the repository at this point in the history
  • Loading branch information
reuk committed Mar 25, 2020
1 parent cfce337 commit dddeb1a
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 4 deletions.
Expand Up @@ -52,6 +52,8 @@
#if JUCE_WINDOWS
static void setParentProcessID (int);
static int getCurrentProcessID();
#else
#include <unistd.h>
#endif

//==============================================================================
Expand Down
2 changes: 1 addition & 1 deletion modules/juce_audio_plugin_client/AU/juce_AU_Wrapper.mm
Expand Up @@ -1815,7 +1815,7 @@ void prepareOutputBuffers (const UInt32 nFrames) noexcept
}
}

void processBlock (AudioBuffer<float>& buffer, MidiBuffer& midiBuffer) noexcept
void processBlock (juce::AudioBuffer<float>& buffer, MidiBuffer& midiBuffer) noexcept
{
const ScopedLock sl (juceFilter->getCallbackLock());

Expand Down
4 changes: 2 additions & 2 deletions modules/juce_audio_plugin_client/AU/juce_AUv3_Wrapper.mm
Expand Up @@ -1130,7 +1130,7 @@ bool isCompatibleWith (const AudioBufferList* other) const noexcept
AudioBufferList* bufferList = nullptr;
int maxFrames, numberOfChannels;
bool isInterleaved;
AudioBuffer<float> scratchBuffer;
juce::AudioBuffer<float> scratchBuffer;
};

//==============================================================================
Expand Down Expand Up @@ -1557,7 +1557,7 @@ AUAudioUnitStatus renderCallback (AudioUnitRenderActionFlags* actionFlags, const
return noErr;
}

void processBlock (AudioBuffer<float>& buffer, MidiBuffer& midiBuffer) noexcept
void processBlock (juce::AudioBuffer<float>& buffer, MidiBuffer& midiBuffer) noexcept
{
auto& processor = getAudioProcessor();
const ScopedLock sl (processor.getCallbackLock());
Expand Down
4 changes: 4 additions & 0 deletions modules/juce_core/files/juce_File.h
Expand Up @@ -20,6 +20,10 @@
==============================================================================
*/

#if JUCE_MAC || JUCE_IOS
using OSType = uint32_t;
#endif

namespace juce
{

Expand Down
4 changes: 4 additions & 0 deletions modules/juce_core/memory/juce_ByteOrder.h
Expand Up @@ -20,6 +20,10 @@
==============================================================================
*/

#if JUCE_MAC || JUCE_IOS
#include <libkern/OSByteOrder.h>
#endif

namespace juce
{

Expand Down
3 changes: 2 additions & 1 deletion modules/juce_core/system/juce_TargetPlatform.h
Expand Up @@ -69,7 +69,8 @@
#define JUCE_LINUX 1
#elif defined (__APPLE_CPP__) || defined (__APPLE_CC__)
#define CF_EXCLUDE_CSTD_HEADERS 1
#include <CoreFoundation/CoreFoundation.h> // (needed to find out what platform we're using)
#include <TargetConditionals.h> // (needed to find out what platform we're using)
#include <AvailabilityMacros.h>
#include "../native/juce_mac_ClangBugWorkaround.h"

#if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR
Expand Down
14 changes: 14 additions & 0 deletions modules/juce_core/text/juce_String.h
Expand Up @@ -20,6 +20,20 @@
==============================================================================
*/

#if JUCE_MAC || JUCE_IOS
// Annoyingly we can only forward-declare a typedef by forward-declaring the
// aliased type
#if __has_attribute(objc_bridge)
#define JUCE_CF_BRIDGED_TYPE(T) __attribute__((objc_bridge(T)))
#else
#define JUCE_CF_BRIDGED_TYPE(T)
#endif

typedef const struct JUCE_CF_BRIDGED_TYPE(NSString) __CFString * CFStringRef;

#undef JUCE_CF_BRIDGED_TYPE
#endif

namespace juce
{

Expand Down

0 comments on commit dddeb1a

Please sign in to comment.