Browse Source

Build fixes

Signed-off-by: falkTX <falktx@falktx.com>
undefined
falkTX 1 year ago
parent
commit
cfbdb86390
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
8 changed files with 27 additions and 18 deletions
  1. +1
    -1
      distrho/DistrhoUtils.hpp
  2. +13
    -6
      distrho/extra/WebViewImpl.cpp
  3. +3
    -1
      distrho/src/DistrhoPluginAU.cpp
  4. +2
    -2
      distrho/src/DistrhoPluginLV2.cpp
  5. +1
    -1
      distrho/src/DistrhoPluginVST.hpp
  6. +4
    -4
      distrho/src/jackbridge/NativeBridge.hpp
  7. +2
    -2
      examples/WebMeters/DistrhoPluginInfo.h
  8. +1
    -1
      examples/WebMeters/ExampleUIWebMeters.cpp

+ 1
- 1
distrho/DistrhoUtils.hpp View File

@@ -38,7 +38,7 @@
typedef SSIZE_T ssize_t;
#endif

#if ! defined(CARLA_MATH_UTILS_HPP_INCLUDED) && ! defined(DISTRHO_PROPER_CPP11_SUPPORT)
#if ! defined(CARLA_MATH_UTILS_HPP_INCLUDED) && ! defined(DISTRHO_PROPER_CPP11_SUPPORT) && ! defined(DISTRHO_OS_MAC)
namespace std {
inline float fmin(float __x, float __y)
{ return __builtin_fminf(__x, __y); }


+ 13
- 6
distrho/extra/WebViewImpl.cpp View File

@@ -313,10 +313,10 @@ struct WebViewData {
#if WEB_VIEW_USING_CHOC
choc::ui::WebView* const webview;
#elif WEB_VIEW_USING_MACOS_WEBKIT
NSView* const view;
WKWebView* const webview;
NSURLRequest* const urlreq;
WEB_VIEW_DELEGATE_CLASS_NAME* const delegate;
NSView* view;
WKWebView* webview;
NSURLRequest* urlreq;
WEB_VIEW_DELEGATE_CLASS_NAME* delegate;
#elif WEB_VIEW_USING_X11_IPC
int shmfd = 0;
char shmname[128] = {};
@@ -329,6 +329,8 @@ struct WebViewData {
::Window childWindow = 0;
::Window ourWindow = 0;
#endif
WebViewData() {}
DISTRHO_DECLARE_NON_COPYABLE(WebViewData);
};

// -----------------------------------------------------------------------------------------------------------
@@ -549,7 +551,12 @@ WebViewHandle webViewCreate(const uintptr_t windowId,
[config release];
[prefs release];

return new WebViewData{options.callback, view, webview, urlreq, delegate};
WebViewData* const handle = new WebViewData;
handle->view = view;
handle->webview = webview;
handle->urlreq = urlreq;
handle->delegate = delegate;
return handle;
#elif WEB_VIEW_USING_X11_IPC
// get startup paths
char ldlinux[PATH_MAX] = {};
@@ -759,7 +766,7 @@ void webViewEvaluateJS(const WebViewHandle handle, const char* const js)
NSString* const nsjs = [[NSString alloc] initWithBytes:js
length:std::strlen(js)
encoding:NSUTF8StringEncoding];
[handle->webview evaluateJavaScript:nsjs completionHandler:nullptr];
[handle->webview evaluateJavaScript:nsjs completionHandler:nil];
[nsjs release];
#elif WEB_VIEW_USING_X11_IPC
d_debug("evaluateJS '%s'", js);


+ 3
- 1
distrho/src/DistrhoPluginAU.cpp View File

@@ -119,7 +119,8 @@ static const char* AudioUnitPropertyID2Str(const AudioUnitPropertyID prop) noexc
PROP(kMusicDeviceProperty_DualSchedulingMode)
#undef PROP
// DPF specific properties
#define PROP(s) case d_cconst(#s): return #s;
#define PROPX(s) (s[0] << 24) | (s[1] << 16) | (s[2] << 8) | (s[3] << 0)
#define PROP(s) case PROPX(#s): return #s;
PROP(DPFi)
PROP(DPFe)
PROP(DPFp)
@@ -129,6 +130,7 @@ static const char* AudioUnitPropertyID2Str(const AudioUnitPropertyID prop) noexc
PROP(DPFs)
PROP(DPFa)
#undef PROP
#undef PROPX
}
return "[unknown]";
}


+ 2
- 2
distrho/src/DistrhoPluginLV2.cpp View File

@@ -590,7 +590,7 @@ public:

const LV2_Atom* property = nullptr;
const LV2_Atom* value = nullptr;
lv2_atom_object_get(object, fURIDs.patchProperty, &property, fURIDs.patchValue, &value, nullptr);
lv2_atom_object_get(object, fURIDs.patchProperty, &property, fURIDs.patchValue, &value, 0);

if (property != nullptr && property->type == fURIDs.atomURID &&
value != nullptr && (value->type == fURIDs.atomPath || value->type == fURIDs.atomString))
@@ -1122,7 +1122,7 @@ public:

const LV2_Atom* property = nullptr;
const LV2_Atom* value = nullptr;
lv2_atom_object_get(object, fURIDs.patchProperty, &property, fURIDs.patchValue, &value, nullptr);
lv2_atom_object_get(object, fURIDs.patchProperty, &property, fURIDs.patchValue, &value, 0);
DISTRHO_SAFE_ASSERT_RETURN(property != nullptr, LV2_WORKER_ERR_UNKNOWN);
DISTRHO_SAFE_ASSERT_RETURN(property->type == fURIDs.atomURID, LV2_WORKER_ERR_UNKNOWN);
DISTRHO_SAFE_ASSERT_RETURN(value != nullptr, LV2_WORKER_ERR_UNKNOWN);


+ 1
- 1
distrho/src/DistrhoPluginVST.hpp View File

@@ -45,7 +45,7 @@

// --------------------------------------------------------------------------------------------------------------------

#ifdef DISTRHO_PROPER_CPP11_SUPPORT
#if defined(DISTRHO_PROPER_CPP11_SUPPORT) || defined(DISTRHO_OS_MAC)
# include <atomic>
#else
// quick and dirty std::atomic replacement for the things we need


+ 4
- 4
distrho/src/jackbridge/NativeBridge.hpp View File

@@ -49,10 +49,10 @@ struct NativeBridge {
uint numMidiOuts;

// JACK callbacks
JackProcessCallback jackProcessCallback = nullptr;
JackBufferSizeCallback bufferSizeCallback = nullptr;
void* jackProcessArg = nullptr;
void* jackBufferSizeArg = nullptr;
JackProcessCallback jackProcessCallback;
JackBufferSizeCallback bufferSizeCallback;
void* jackProcessArg;
void* jackBufferSizeArg;

// Runtime buffers
enum PortMask {


+ 2
- 2
examples/WebMeters/DistrhoPluginInfo.h View File

@@ -37,8 +37,8 @@
#define METER_COLOR_GREEN 0
#define METER_COLOR_BLUE 1

#define DISTRHO_UI_DEFAULT_WIDTH 600
#define DISTRHO_UI_DEFAULT_HEIGHT 400
#define DISTRHO_UI_DEFAULT_WIDTH 100
#define DISTRHO_UI_DEFAULT_HEIGHT 500
#define kVerticalOffset 0

#endif // DISTRHO_PLUGIN_INFO_H_INCLUDED

+ 1
- 1
examples/WebMeters/ExampleUIWebMeters.cpp View File

@@ -24,7 +24,7 @@ class ExampleUIMeters : public UI
{
public:
ExampleUIMeters()
: UI(100, 500, false)
: UI()
{
}



Loading…
Cancel
Save