-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add Carla support for MacOS #4558
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
4d99f7e
Add Carla support for MacOS
tresf d4d86f1
Update .gitmodules
tresf d2e3728
Update BuildPlugin.cmake
tresf 0c4ea23
Update CarlaPkgConfig.cmake
tresf 4720ed8
Update CarlaPkgConfig.cmake
tresf e576229
Move carla to homebrew, remove submodule
tresf 0a7740b
Remove dylib from bundle
tresf 8119462
Fix linking
tresf 5f4af04
Better commenting, fix cmake version detection
tresf ece0c67
Whitespace removal
tresf f640b8e
Simplify SHARED linking logic
tresf 73a2add
Don't hard-code carla path
tresf 38e48c0
Nudge to latest Carla
tresf ee6d502
More scalable relinking
tresf b38dd02
Add old carla lib fallback
tresf e89aee5
Bump to homebrew carla; minor formatting
tresf a5a9a15
Fix header on 1.9.9 and older
tresf 79a5367
Use header definitions if avail
tresf 94c747c
Fix more missing headers
tresf 0838c9b
Uglify :D
tresf File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| /* | ||
| * carla.cpp - Carla for LMMS | ||
| * | ||
| * Copyright (C) 2014 Filipe Coelho <[email protected]> | ||
| * Copyright (C) 2014-2018 Filipe Coelho <[email protected]> | ||
| * | ||
| * This file is part of LMMS - https://lmms.io | ||
| * | ||
|
|
@@ -24,9 +24,6 @@ | |
|
|
||
| #include "carla.h" | ||
|
|
||
| #define REAL_BUILD // FIXME this shouldn't be needed | ||
| #include "CarlaHost.h" | ||
|
|
||
| #include "Engine.h" | ||
| #include "Song.h" | ||
| #include "gui_templates.h" | ||
|
|
@@ -132,14 +129,6 @@ static const char* host_ui_save_file(NativeHostHandle, bool isDir, const char* t | |
|
|
||
| // ----------------------------------------------------------------------- | ||
|
|
||
| CARLA_EXPORT | ||
| const NativePluginDescriptor* carla_get_native_patchbay_plugin(); | ||
|
|
||
| CARLA_EXPORT | ||
| const NativePluginDescriptor* carla_get_native_rack_plugin(); | ||
|
|
||
| // ----------------------------------------------------------------------- | ||
|
|
||
| CarlaInstrument::CarlaInstrument(InstrumentTrack* const instrumentTrack, const Descriptor* const descriptor, const bool isPatchbay) | ||
| : Instrument(instrumentTrack, descriptor), | ||
| kIsPatchbay(isPatchbay), | ||
|
|
@@ -161,8 +150,9 @@ CarlaInstrument::CarlaInstrument(InstrumentTrack* const instrumentTrack, const D | |
| path.cdUp(); | ||
| resourcesPath = path.absolutePath() + "/share/carla/resources"; | ||
| #elif defined(CARLA_OS_MAC) | ||
| // assume standard install location | ||
| resourcesPath = "/Applications/Carla.app/Contents/MacOS/resources"; | ||
| // parse prefix from dll filename | ||
| QDir path = QFileInfo(dllName).dir(); | ||
| resourcesPath = path.absolutePath() + "/resources"; | ||
| #elif defined(CARLA_OS_WIN32) || defined(CARLA_OS_WIN64) | ||
| // not yet supported | ||
| #endif | ||
|
|
@@ -254,7 +244,7 @@ void CarlaInstrument::handleUiClosed() | |
| emit uiClosed(); | ||
| } | ||
|
|
||
| intptr_t CarlaInstrument::handleDispatcher(const NativeHostDispatcherOpcode opcode, const int32_t index, const intptr_t value, void* const ptr, const float opt) | ||
| intptr_t CarlaInstrument::handleDispatcher(const NativeHostDispatcherOpcode opcode, const int32_t, const intptr_t, void* const, const float) | ||
| { | ||
| intptr_t ret = 0; | ||
|
|
||
|
|
@@ -267,13 +257,10 @@ intptr_t CarlaInstrument::handleDispatcher(const NativeHostDispatcherOpcode opco | |
| qApp->processEvents(); | ||
| break; | ||
| default: | ||
| break; | ||
| break; | ||
| } | ||
tresf marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| return ret; | ||
|
|
||
| // unused for now | ||
| (void)index; (void)value; (void)ptr; (void)opt; | ||
| } | ||
|
|
||
| // ------------------------------------------------------------------- | ||
|
|
@@ -448,9 +435,12 @@ bool CarlaInstrument::handleMidiEvent(const MidiEvent& event, const MidiTime&, f | |
|
|
||
| PluginView* CarlaInstrument::instantiateView(QWidget* parent) | ||
| { | ||
| // Disable plugin focus per https://bugreports.qt.io/browse/QTBUG-30181 | ||
| #ifndef CARLA_OS_MAC | ||
| if (QWidget* const window = parent->window()) | ||
| fHost.uiParentId = window->winId(); | ||
| else | ||
| #endif | ||
| fHost.uiParentId = 0; | ||
|
|
||
| std::free((char*)fHost.uiName); | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| /* | ||
| * carla.h - Carla for LMMS | ||
| * | ||
| * Copyright (C) 2014 Filipe Coelho <[email protected]> | ||
| * Copyright (C) 2014-2018 Filipe Coelho <[email protected]> | ||
| * | ||
| * This file is part of LMMS - https://lmms.io | ||
| * | ||
|
|
@@ -27,7 +27,19 @@ | |
|
|
||
| #include <QtCore/QMutex> | ||
|
|
||
| #include "CarlaNative.h" | ||
| #define REAL_BUILD // FIXME this shouldn't be needed | ||
| #if CARLA_VERSION_HEX >= 0x010911 | ||
| #include "CarlaNativePlugin.h" | ||
| #else | ||
| #include "CarlaBackend.h" | ||
| #include "CarlaNative.h" | ||
| #include "CarlaUtils.h" | ||
| CARLA_EXPORT | ||
| const NativePluginDescriptor* carla_get_native_patchbay_plugin(); | ||
|
|
||
| CARLA_EXPORT | ||
| const NativePluginDescriptor* carla_get_native_rack_plugin(); | ||
| #endif | ||
|
|
||
| #include "Instrument.h" | ||
| #include "InstrumentView.h" | ||
|
|
@@ -44,7 +56,7 @@ class PLUGIN_EXPORT CarlaInstrument : public Instrument | |
| CarlaInstrument(InstrumentTrack* const instrumentTrack, const Descriptor* const descriptor, const bool isPatchbay); | ||
| virtual ~CarlaInstrument(); | ||
|
|
||
| // CarlaNative functions | ||
| // Carla NativeHostDescriptor functions | ||
| uint32_t handleGetBufferSize() const; | ||
| double handleGetSampleRate() const; | ||
| bool handleIsOffline() const; | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| /* | ||
| * carlapatchbay.cpp - Carla for LMMS (Patchbay) | ||
| * | ||
| * Copyright (C) 2014 Filipe Coelho <[email protected]> | ||
| * Copyright (C) 2014-2018 Filipe Coelho <[email protected]> | ||
| * | ||
| * This file is part of LMMS - https://lmms.io | ||
| * | ||
|
|
@@ -36,7 +36,7 @@ Plugin::Descriptor PLUGIN_EXPORT carlapatchbay_plugin_descriptor = | |
| QT_TRANSLATE_NOOP( "pluginBrowser", | ||
| "Carla Patchbay Instrument" ), | ||
| "falkTX <falktx/at/falktx.com>", | ||
| 0x0195, | ||
| CARLA_VERSION_HEX, | ||
| Plugin::Instrument, | ||
| new PluginPixmapLoader( "logo" ), | ||
| NULL, | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| /* | ||
| * carlarack.cpp - Carla for LMMS (Rack) | ||
| * | ||
| * Copyright (C) 2014 Filipe Coelho <[email protected]> | ||
| * Copyright (C) 2014-2018 Filipe Coelho <[email protected]> | ||
| * | ||
| * This file is part of LMMS - https://lmms.io | ||
| * | ||
|
|
@@ -36,7 +36,7 @@ Plugin::Descriptor PLUGIN_EXPORT carlarack_plugin_descriptor = | |
| QT_TRANSLATE_NOOP( "pluginBrowser", | ||
| "Carla Rack Instrument" ), | ||
| "falkTX <falktx/at/falktx.com>", | ||
| 0x0195, | ||
| CARLA_VERSION_HEX, | ||
| Plugin::Instrument, | ||
| new PluginPixmapLoader( "logo" ), | ||
| NULL, | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.