Browse Source

More fixes

Signed-off-by: falkTX <falktx@gmail.com>
tags/v2.1-alpha1-winvst
parent
commit
9de72258bd
9 changed files with 44 additions and 17 deletions
  1. +3
    -3
      Makefile
  2. +0
    -2
      source/backend/Makefile
  3. +7
    -0
      source/backend/plugin/CarlaPluginJuce.cpp
  4. +7
    -3
      source/backend/plugin/CarlaPluginVST2.cpp
  5. +1
    -0
      source/modules/AppConfig.h
  6. +9
    -5
      source/modules/juce_audio_devices/native/juce_linux_Midi.cpp
  7. +11
    -4
      source/modules/juce_audio_processors/juce_audio_processors.cpp
  8. +4
    -0
      source/modules/juce_audio_processors/scanning/juce_KnownPluginList.cpp
  9. +2
    -0
      source/modules/juce_audio_processors/scanning/juce_KnownPluginList.h

+ 3
- 3
Makefile View File

@@ -48,9 +48,6 @@ ifeq ($(HAVE_HYLIA),true)
ALL_LIBS += $(MODULEDIR)/hylia.a
endif

ALL_LIBS += $(MODULEDIR)/rtaudio.a
ALL_LIBS += $(MODULEDIR)/rtmidi.a

ifeq ($(HAVE_QT4),true)
ALL_LIBS += $(MODULEDIR)/theme.qt4.a
endif
@@ -70,6 +67,9 @@ ifeq ($(MACOS_OR_WIN32),true)
ALL_LIBS += $(MODULEDIR)/juce_graphics.a
ALL_LIBS += $(MODULEDIR)/juce_gui_basics.a
endif
else
ALL_LIBS += $(MODULEDIR)/rtaudio.a
ALL_LIBS += $(MODULEDIR)/rtmidi.a
endif

libs: $(ALL_LIBS)


+ 0
- 2
source/backend/Makefile View File

@@ -47,8 +47,6 @@ STANDALONE_LIBS += $(MODULEDIR)/juce_events.a
ifeq ($(MACOS_OR_WIN32),true)
STANDALONE_LIBS += $(MODULEDIR)/juce_graphics.a
STANDALONE_LIBS += $(MODULEDIR)/juce_gui_basics.a
# ifeq ($(MACOS),true)
# STANDALONE_LIBS += $(MODULEDIR)/juce_gui_extra.a
endif
else
STANDALONE_LIBS += $(MODULEDIR)/rtaudio.a


+ 7
- 0
source/backend/plugin/CarlaPluginJuce.cpp View File

@@ -1190,6 +1190,13 @@ public:
juce::KnownPluginList plist;
for (int i = 0; i < fFormatManager.getNumFormats(); ++i)
plist.scanAndAddFile(fileOrIdentifier, true, pluginDescriptions, *fFormatManager.getFormat(i));

if (pluginDescriptions.size() == 0)
{
pData->engine->setLastError("Failed to get plugin description");
return false;
}

fDesc = *pluginDescriptions[0];
}



+ 7
- 3
source/backend/plugin/CarlaPluginVST2.cpp View File

@@ -18,7 +18,11 @@
#include "CarlaPluginInternal.hpp"
#include "CarlaEngine.hpp"

#ifndef USING_JUCE
#if defined(USING_JUCE) && (defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN))
# define USE_JUCE_FOR_VST2
#endif

#ifndef USE_JUCE_FOR_VST2

#include "CarlaVstUtils.hpp"

@@ -2621,7 +2625,7 @@ CarlaPluginVST2* CarlaPluginVST2::sLastCarlaPluginVST2 = nullptr;

CARLA_BACKEND_END_NAMESPACE

#endif // USING_JUCE
#endif // USE_JUCE_FOR_VST2

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

@@ -2631,7 +2635,7 @@ CarlaPlugin* CarlaPlugin::newVST2(const Initializer& init)
{
carla_debug("CarlaPlugin::newVST2({%p, \"%s\", \"%s\", " P_INT64 "})", init.engine, init.filename, init.name, init.uniqueId);

#ifdef USING_JUCE
#ifdef USE_JUCE_FOR_VST2
return newJuce(init, "VST2");
#else
CarlaPluginVST2* const plugin(new CarlaPluginVST2(init.engine, init.id));


+ 1
- 0
source/modules/AppConfig.h View File

@@ -113,6 +113,7 @@
*/
#ifdef APPCONFIG_OS_LINUX
#define JUCE_ALSA 1
#define JUCE_ALSA_MIDI_NAME "Carla"
#define JUCE_ALSA_MIDI_INPUT_NAME "Carla"
#define JUCE_ALSA_MIDI_OUTPUT_NAME "Carla"
#define JUCE_ALSA_MIDI_INPUT_PORT_NAME "Midi In"


+ 9
- 5
source/modules/juce_audio_devices/native/juce_linux_Midi.cpp View File

@@ -275,12 +275,16 @@ private:
jassert (instance == nullptr);
snd_seq_open (&handle, "default", SND_SEQ_OPEN_DUPLEX, 0);
snd_seq_nonblock (handle, SND_SEQ_NONBLOCK);
snd_seq_set_client_name (handle, JUCE_ALSA_MIDI_NAME);
clientId = snd_seq_client_id(handle);
// It's good idea to pre-allocate a good number of elements
ports.ensureStorageAllocated (32);
if (handle != nullptr)
{
snd_seq_nonblock (handle, SND_SEQ_NONBLOCK);
snd_seq_set_client_name (handle, JUCE_ALSA_MIDI_NAME);
clientId = snd_seq_client_id(handle);
// It's good idea to pre-allocate a good number of elements
ports.ensureStorageAllocated (32);
}
}
~AlsaClient()


+ 11
- 4
source/modules/juce_audio_processors/juce_audio_processors.cpp View File

@@ -37,7 +37,10 @@
#define JUCE_CORE_INCLUDE_OBJC_HELPERS 1
#include "juce_audio_processors.h"
#include <juce_gui_extra/juce_gui_extra.h>
#if JUCE_MODULE_AVAILABLE_juce_gui_extra
#include <juce_gui_extra/juce_gui_extra.h>
#endif
//==============================================================================
#if JUCE_MAC
@@ -180,6 +183,10 @@ void AutoResizingNSViewComponentWithParent::timerCallback() override
#include "format_types/juce_AudioUnitPluginFormat.mm"
#include "scanning/juce_KnownPluginList.cpp"
#include "scanning/juce_PluginDirectoryScanner.cpp"
#include "scanning/juce_PluginListComponent.cpp"
#include "utilities/juce_AudioProcessorParameters.cpp"
#include "utilities/juce_AudioProcessorValueTreeState.cpp"
#if ! JUCE_AUDIOPROCESSOR_NO_GUI
#include "scanning/juce_PluginListComponent.cpp"
#endif
#include "utilities/juce_AudioProcessorParameters.cpp"
#if ! JUCE_AUDIOPROCESSOR_NO_GUI
#include "utilities/juce_AudioProcessorValueTreeState.cpp"
#endif

+ 4
- 0
source/modules/juce_audio_processors/scanning/juce_KnownPluginList.cpp View File

@@ -493,6 +493,7 @@ struct PluginTreeUtils
return false;
}
#if ! JUCE_AUDIOPROCESSOR_NO_GUI
static bool addToMenu (const KnownPluginList::PluginTree& tree, PopupMenu& m,
const OwnedArray<PluginDescription>& allPlugins,
const String& currentlyTickedPluginID)
@@ -523,6 +524,7 @@ struct PluginTreeUtils
return isTicked;
}
#endif
};
KnownPluginList::PluginTree* KnownPluginList::createTree (const SortMethod sortMethod) const
@@ -557,12 +559,14 @@ KnownPluginList::PluginTree* KnownPluginList::createTree (const SortMethod sortM
}
//==============================================================================
#if ! JUCE_AUDIOPROCESSOR_NO_GUI
void KnownPluginList::addToMenu (PopupMenu& menu, const SortMethod sortMethod,
const String& currentlyTickedPluginID) const
{
ScopedPointer<PluginTree> tree (createTree (sortMethod));
PluginTreeUtils::addToMenu (*tree, menu, types, currentlyTickedPluginID);
}
#endif
int KnownPluginList::getIndexChosenByMenu (const int menuResultCode) const
{


+ 2
- 0
source/modules/juce_audio_processors/scanning/juce_KnownPluginList.h View File

@@ -142,6 +142,7 @@ public:
};
//==============================================================================
#if ! JUCE_AUDIOPROCESSOR_NO_GUI
/** Adds all the plugin types to a popup menu so that the user can select one.
Depending on the sort method, it may add sub-menus for categories,
@@ -151,6 +152,7 @@ public:
*/
void addToMenu (PopupMenu& menu, SortMethod sortMethod,
const String& currentlyTickedPluginID = String()) const;
#endif
/** Converts a menu item index that has been chosen into its index in this list.
Returns -1 if it's not an ID that was used.


Loading…
Cancel
Save