| @@ -38,7 +38,7 @@ export PYRCC="wine C:\\\\Python34\\\\Lib\\\\site-packages\\\\PyQt5\\\\pyrcc5.exe | |||||
| export DEFAULT_QT=5 | export DEFAULT_QT=5 | ||||
| make BUILDING_FOR_WINDOWS=true $JOBS | |||||
| make BUILDING_FOR_WINDOWS=true HAVE_ZYN_DEPS=false $JOBS | |||||
| export PYTHONPATH=`pwd`/source | export PYTHONPATH=`pwd`/source | ||||
| @@ -165,26 +165,29 @@ endif | |||||
| ifeq ($(MACOS_OR_WIN32),true) | ifeq ($(MACOS_OR_WIN32),true) | ||||
| HAVE_DGL = true | HAVE_DGL = true | ||||
| HAVE_HYLIA = true | |||||
| else | else | ||||
| HAVE_DGL = $(shell pkg-config --exists gl x11 && echo true) | |||||
| HAVE_GTK2 = $(shell pkg-config --exists gtk+-2.0 && echo true) | HAVE_GTK2 = $(shell pkg-config --exists gtk+-2.0 && echo true) | ||||
| HAVE_GTK3 = $(shell pkg-config --exists gtk+-3.0 && echo true) | HAVE_GTK3 = $(shell pkg-config --exists gtk+-3.0 && echo true) | ||||
| ifeq ($(LINUX),true) | |||||
| HAVE_ALSA = $(shell pkg-config --exists alsa && echo true) | |||||
| HAVE_DGL = $(shell pkg-config --exists gl x11 && echo true) | |||||
| HAVE_HYLIA = true | |||||
| HAVE_NTK = $(shell pkg-config --exists ntk ntk_images && echo true) | |||||
| HAVE_PULSEAUDIO = $(shell pkg-config --exists libpulse-simple && echo true) | HAVE_PULSEAUDIO = $(shell pkg-config --exists libpulse-simple && echo true) | ||||
| HAVE_QT4 = $(shell pkg-config --exists QtCore QtGui && echo true) | |||||
| HAVE_QT5 = $(shell pkg-config --exists Qt5Core Qt5Gui Qt5Widgets && echo true) | |||||
| HAVE_X11 = $(shell pkg-config --exists x11 && echo true) | HAVE_X11 = $(shell pkg-config --exists x11 && echo true) | ||||
| endif | endif | ||||
| ifeq ($(MACOS),true) | |||||
| HAVE_HYLIA = true | |||||
| endif | endif | ||||
| HAVE_QT4 = $(shell pkg-config --exists QtCore QtGui && echo true) | |||||
| HAVE_QT5 = $(shell pkg-config --exists Qt5Core Qt5Gui Qt5Widgets && echo true) | |||||
| ifeq ($(LINUX),true) | |||||
| HAVE_ALSA = $(shell pkg-config --exists alsa && echo true) | |||||
| HAVE_HYLIA = true | |||||
| endif | |||||
| HAVE_LIBLO = $(shell pkg-config --exists liblo && echo true) | |||||
| HAVE_FLUIDSYNTH = $(shell pkg-config --exists fluidsynth && echo true) | HAVE_FLUIDSYNTH = $(shell pkg-config --exists fluidsynth && echo true) | ||||
| HAVE_LIBLO = $(shell pkg-config --exists liblo && echo true) | |||||
| HAVE_LINUXSAMPLER = $(shell pkg-config --atleast-version=1.0.0.svn41 linuxsampler && echo true) | HAVE_LINUXSAMPLER = $(shell pkg-config --atleast-version=1.0.0.svn41 linuxsampler && echo true) | ||||
| HAVE_NTK = $(shell pkg-config --exists ntk ntk_images && echo true) | |||||
| HAVE_PROJECTM = $(shell pkg-config --exists libprojectM && echo true) | HAVE_PROJECTM = $(shell pkg-config --exists libprojectM && echo true) | ||||
| # -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
| @@ -357,7 +360,7 @@ endif | |||||
| # -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
| # Set libs stuff (part 2) | # Set libs stuff (part 2) | ||||
| RTAUDIO_FLAGS = -DHAVE_GETTIMEOFDAY -D__UNIX_JACK__ | |||||
| RTAUDIO_FLAGS = -DHAVE_GETTIMEOFDAY | |||||
| ifeq ($(DEBUG),true) | ifeq ($(DEBUG),true) | ||||
| RTAUDIO_FLAGS += -D__RTAUDIO_DEBUG__ | RTAUDIO_FLAGS += -D__RTAUDIO_DEBUG__ | ||||
| @@ -370,6 +373,7 @@ endif | |||||
| ifeq ($(UNIX),true) | ifeq ($(UNIX),true) | ||||
| HYLIA_FLAGS += | HYLIA_FLAGS += | ||||
| RTAUDIO_FLAGS += -D__UNIX_JACK__ | |||||
| endif | endif | ||||
| ifeq ($(LINUX),true) | ifeq ($(LINUX),true) | ||||
| @@ -411,6 +415,7 @@ JACKBRIDGE_LIBS = -lpthread | |||||
| JUCE_CORE_LIBS = -luuid -lwsock32 -lwininet -lversion -lole32 -lws2_32 -loleaut32 -limm32 -lcomdlg32 -lshlwapi -lrpcrt4 -lwinmm | JUCE_CORE_LIBS = -luuid -lwsock32 -lwininet -lversion -lole32 -lws2_32 -loleaut32 -limm32 -lcomdlg32 -lshlwapi -lrpcrt4 -lwinmm | ||||
| LILV_LIBS = -lm | LILV_LIBS = -lm | ||||
| RTAUDIO_FLAGS += -D__WINDOWS_ASIO__ -D__WINDOWS_DS__ -D__WINDOWS_WASAPI__ | RTAUDIO_FLAGS += -D__WINDOWS_ASIO__ -D__WINDOWS_DS__ -D__WINDOWS_WASAPI__ | ||||
| RTAUDIO_LIBS += -ldsound -luuid -lksuser -lwinmm | |||||
| RTMIDI_FLAGS += -D__WINDOWS_MM__ | RTMIDI_FLAGS += -D__WINDOWS_MM__ | ||||
| endif | endif | ||||
| @@ -1159,18 +1159,19 @@ public: | |||||
| * Native audio APIs. | * Native audio APIs. | ||||
| */ | */ | ||||
| enum AudioApi { | enum AudioApi { | ||||
| AUDIO_API_NULL = 0, | |||||
| AUDIO_API_NULL, | |||||
| // common | // common | ||||
| AUDIO_API_JACK = 1, | |||||
| AUDIO_API_JACK, | |||||
| AUDIO_API_OSS, | |||||
| // linux | // linux | ||||
| AUDIO_API_ALSA = 2, | |||||
| AUDIO_API_OSS = 3, | |||||
| AUDIO_API_PULSE = 4, | |||||
| AUDIO_API_ALSA, | |||||
| AUDIO_API_PULSEAUDIO, | |||||
| // macos | // macos | ||||
| AUDIO_API_CORE = 5, | |||||
| AUDIO_API_COREAUDIO, | |||||
| // windows | // windows | ||||
| AUDIO_API_ASIO = 6, | |||||
| AUDIO_API_DS = 7 | |||||
| AUDIO_API_ASIO, | |||||
| AUDIO_API_DIRECTSOUND, | |||||
| AUDIO_API_WASAPI | |||||
| }; | }; | ||||
| // ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
| @@ -79,11 +79,7 @@ uint CarlaEngine::getDriverCount() | |||||
| count += 1; | count += 1; | ||||
| #ifndef BUILD_BRIDGE | #ifndef BUILD_BRIDGE | ||||
| # if defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN) | |||||
| count += getJuceApiCount(); | |||||
| # else | |||||
| count += getRtAudioApiCount(); | count += getRtAudioApiCount(); | ||||
| # endif | |||||
| #endif | #endif | ||||
| return count; | return count; | ||||
| @@ -99,21 +95,12 @@ const char* CarlaEngine::getDriverName(const uint index2) | |||||
| return "JACK"; | return "JACK"; | ||||
| #ifndef BUILD_BRIDGE | #ifndef BUILD_BRIDGE | ||||
| # if defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN) | |||||
| if (const uint count = getJuceApiCount()) | |||||
| { | |||||
| if (index < count) | |||||
| return getJuceApiName(index); | |||||
| index -= count; | |||||
| } | |||||
| # else | |||||
| if (const uint count = getRtAudioApiCount()) | if (const uint count = getRtAudioApiCount()) | ||||
| { | { | ||||
| if (index < count) | if (index < count) | ||||
| return getRtAudioApiName(index); | return getRtAudioApiName(index); | ||||
| index -= count; | index -= count; | ||||
| } | } | ||||
| # endif | |||||
| #endif | #endif | ||||
| carla_stderr("CarlaEngine::getDriverName(%i) - invalid index", index2); | carla_stderr("CarlaEngine::getDriverName(%i) - invalid index", index2); | ||||
| @@ -133,21 +120,12 @@ const char* const* CarlaEngine::getDriverDeviceNames(const uint index2) | |||||
| } | } | ||||
| #ifndef BUILD_BRIDGE | #ifndef BUILD_BRIDGE | ||||
| # if defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN) | |||||
| if (const uint count = getJuceApiCount()) | |||||
| { | |||||
| if (index < count) | |||||
| return getJuceApiDeviceNames(index); | |||||
| index -= count; | |||||
| } | |||||
| # else | |||||
| if (const uint count = getRtAudioApiCount()) | if (const uint count = getRtAudioApiCount()) | ||||
| { | { | ||||
| if (index < count) | if (index < count) | ||||
| return getRtAudioApiDeviceNames(index); | return getRtAudioApiDeviceNames(index); | ||||
| index -= count; | index -= count; | ||||
| } | } | ||||
| # endif | |||||
| #endif | #endif | ||||
| carla_stderr("CarlaEngine::getDriverDeviceNames(%i) - invalid index", index2); | carla_stderr("CarlaEngine::getDriverDeviceNames(%i) - invalid index", index2); | ||||
| @@ -171,21 +149,12 @@ const EngineDriverDeviceInfo* CarlaEngine::getDriverDeviceInfo(const uint index2 | |||||
| } | } | ||||
| #ifndef BUILD_BRIDGE | #ifndef BUILD_BRIDGE | ||||
| # if defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN) | |||||
| if (const uint count = getJuceApiCount()) | |||||
| { | |||||
| if (index < count) | |||||
| return getJuceDeviceInfo(index, deviceName); | |||||
| index -= count; | |||||
| } | |||||
| # else | |||||
| if (const uint count = getRtAudioApiCount()) | if (const uint count = getRtAudioApiCount()) | ||||
| { | { | ||||
| if (index < count) | if (index < count) | ||||
| return getRtAudioDeviceInfo(index, deviceName); | return getRtAudioDeviceInfo(index, deviceName); | ||||
| index -= count; | index -= count; | ||||
| } | } | ||||
| # endif | |||||
| #endif | #endif | ||||
| carla_stderr("CarlaEngine::getDriverDeviceNames(%i, \"%s\") - invalid index", index2, deviceName); | carla_stderr("CarlaEngine::getDriverDeviceNames(%i, \"%s\") - invalid index", index2, deviceName); | ||||
| @@ -201,37 +170,37 @@ CarlaEngine* CarlaEngine::newDriverByName(const char* const driverName) | |||||
| return newJack(); | return newJack(); | ||||
| #ifndef BUILD_BRIDGE | #ifndef BUILD_BRIDGE | ||||
| # if defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN) | |||||
| // ------------------------------------------------------------------- | |||||
| // macos | |||||
| if (std::strcmp(driverName, "CoreAudio") == 0) | |||||
| return newJuce(AUDIO_API_CORE); | |||||
| // ------------------------------------------------------------------- | |||||
| // windows | |||||
| if (std::strcmp(driverName, "ASIO") == 0) | |||||
| return newJuce(AUDIO_API_ASIO); | |||||
| if (std::strcmp(driverName, "DirectSound") == 0) | |||||
| return newJuce(AUDIO_API_DS); | |||||
| #else | |||||
| // ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
| // common | // common | ||||
| if (std::strncmp(driverName, "JACK ", 5) == 0) | if (std::strncmp(driverName, "JACK ", 5) == 0) | ||||
| return newRtAudio(AUDIO_API_JACK); | return newRtAudio(AUDIO_API_JACK); | ||||
| if (std::strcmp(driverName, "OSS") == 0) | |||||
| return newRtAudio(AUDIO_API_OSS); | |||||
| // ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
| // linux | // linux | ||||
| if (std::strcmp(driverName, "ALSA") == 0) | if (std::strcmp(driverName, "ALSA") == 0) | ||||
| return newRtAudio(AUDIO_API_ALSA); | return newRtAudio(AUDIO_API_ALSA); | ||||
| if (std::strcmp(driverName, "OSS") == 0) | |||||
| return newRtAudio(AUDIO_API_OSS); | |||||
| if (std::strcmp(driverName, "PulseAudio") == 0) | if (std::strcmp(driverName, "PulseAudio") == 0) | ||||
| return newRtAudio(AUDIO_API_PULSE); | |||||
| # endif | |||||
| return newRtAudio(AUDIO_API_PULSEAUDIO); | |||||
| // ------------------------------------------------------------------- | |||||
| // macos | |||||
| if (std::strcmp(driverName, "CoreAudio") == 0) | |||||
| return newRtAudio(AUDIO_API_COREAUDIO); | |||||
| // ------------------------------------------------------------------- | |||||
| // windows | |||||
| if (std::strcmp(driverName, "ASIO") == 0) | |||||
| return newRtAudio(AUDIO_API_ASIO); | |||||
| if (std::strcmp(driverName, "DirectSound") == 0) | |||||
| return newRtAudio(AUDIO_API_DIRECTSOUND); | |||||
| if (std::strcmp(driverName, "WASAPI") == 0) | |||||
| return newRtAudio(AUDIO_API_WASAPI); | |||||
| #endif | #endif | ||||
| carla_stderr("CarlaEngine::newDriverByName(\"%s\") - invalid driver name", driverName); | carla_stderr("CarlaEngine::newDriverByName(\"%s\") - invalid driver name", driverName); | ||||
| @@ -575,6 +544,7 @@ bool CarlaEngine::addPlugin(const BinaryType btype, const PluginType ptype, | |||||
| break; | break; | ||||
| case PLUGIN_DSSI: | case PLUGIN_DSSI: | ||||
| // TODO remove this | |||||
| if (CarlaString(filename).contains("dssi-vst", true)) | if (CarlaString(filename).contains("dssi-vst", true)) | ||||
| { | { | ||||
| const ScopedEngineEnvironmentLocker _seel(this); | const ScopedEngineEnvironmentLocker _seel(this); | ||||
| @@ -22,15 +22,6 @@ | |||||
| #include "CarlaMathUtils.hpp" | #include "CarlaMathUtils.hpp" | ||||
| #include "CarlaMIDI.h" | #include "CarlaMIDI.h" | ||||
| // FIXME: update to new Juce API | |||||
| #if defined(__clang__) | |||||
| # pragma clang diagnostic push | |||||
| # pragma clang diagnostic ignored "-Wdeprecated-declarations" | |||||
| #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) | |||||
| # pragma GCC diagnostic push | |||||
| # pragma GCC diagnostic ignored "-Wdeprecated-declarations" | |||||
| #endif | |||||
| using juce::AudioBuffer; | using juce::AudioBuffer; | ||||
| using juce::FloatVectorOperations; | using juce::FloatVectorOperations; | ||||
| using juce::MemoryBlock; | using juce::MemoryBlock; | ||||
| @@ -39,12 +30,6 @@ using juce::StringArray; | |||||
| using juce::jmin; | using juce::jmin; | ||||
| using juce::jmax; | using juce::jmax; | ||||
| #if 0 | |||||
| using juce::AudioPluginInstance; | |||||
| using juce::AudioProcessor; | |||||
| using juce::AudioProcessorEditor; | |||||
| #endif | |||||
| CARLA_BACKEND_START_NAMESPACE | CARLA_BACKEND_START_NAMESPACE | ||||
| // ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
| @@ -23,9 +23,6 @@ | |||||
| #include "CarlaPatchbayUtils.hpp" | #include "CarlaPatchbayUtils.hpp" | ||||
| #include "CarlaStringList.hpp" | #include "CarlaStringList.hpp" | ||||
| #include "AppConfig.h" | |||||
| #include "juce_audio_basics/juce_audio_basics.h" | |||||
| CARLA_BACKEND_START_NAMESPACE | CARLA_BACKEND_START_NAMESPACE | ||||
| // ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
| @@ -139,55 +136,6 @@ struct RackGraph { | |||||
| CARLA_DECLARE_NON_COPY_CLASS(RackGraph) | CARLA_DECLARE_NON_COPY_CLASS(RackGraph) | ||||
| }; | }; | ||||
| #if 0 | |||||
| typedef juce::AudioProcessorGraph CarlaAudioProcessorGraph; | |||||
| using juce::AudioSampleBuffer; | |||||
| using juce::MidiBuffer; | |||||
| // ----------------------------------------------------------------------- | |||||
| // PatchbayGraph | |||||
| struct PatchbayGraph { | |||||
| PatchbayConnectionList connections; | |||||
| CarlaAudioProcessorGraph graph; | |||||
| AudioSampleBuffer audioBuffer; | |||||
| MidiBuffer midiBuffer; | |||||
| const uint32_t inputs; | |||||
| const uint32_t outputs; | |||||
| mutable CharStringListPtr retCon; | |||||
| bool usingExternal; | |||||
| ExternalGraph extGraph; | |||||
| PatchbayGraph(CarlaEngine* const engine, const uint32_t inputs, const uint32_t outputs); | |||||
| ~PatchbayGraph(); | |||||
| void setBufferSize(const uint32_t bufferSize); | |||||
| void setSampleRate(const double sampleRate); | |||||
| void setOffline(const bool offline); | |||||
| void addPlugin(CarlaPlugin* const plugin); | |||||
| void replacePlugin(CarlaPlugin* const oldPlugin, CarlaPlugin* const newPlugin); | |||||
| void renamePlugin(CarlaPlugin* const plugin, const char* const newName); | |||||
| void removePlugin(CarlaPlugin* const plugin); | |||||
| void removeAllPlugins(); | |||||
| bool connect(const bool external, const uint groupA, const uint portA, const uint groupB, const uint portB, const bool sendCallback); | |||||
| bool disconnect(const uint connectionId); | |||||
| void disconnectInternalGroup(const uint groupId) noexcept; | |||||
| void refresh(const char* const deviceName); | |||||
| const char* const* getConnections(const bool external) const; | |||||
| bool getGroupAndPortIdFromFullName(const bool external, const char* const fullPortName, uint& groupId, uint& portId) const; | |||||
| void process(CarlaEngine::ProtectedData* const data, const float* const* const inBuf, float* const* const outBuf, const int frames); | |||||
| CarlaEngine* const kEngine; | |||||
| CARLA_DECLARE_NON_COPY_CLASS(PatchbayGraph) | |||||
| }; | |||||
| #endif | |||||
| // ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
| CARLA_BACKEND_END_NAMESPACE | CARLA_BACKEND_END_NAMESPACE | ||||
| @@ -24,15 +24,10 @@ | |||||
| #include "RtLinkedList.hpp" | #include "RtLinkedList.hpp" | ||||
| #include "jackbridge/JackBridge.hpp" | #include "jackbridge/JackBridge.hpp" | ||||
| #include "juce_audio_basics/juce_audio_basics.h" | |||||
| #include "rtaudio/RtAudio.h" | #include "rtaudio/RtAudio.h" | ||||
| #include "rtmidi/RtMidi.h" | #include "rtmidi/RtMidi.h" | ||||
| using juce::jmax; | |||||
| using juce::AudioSampleBuffer; | |||||
| using juce::FloatVectorOperations; | |||||
| CARLA_BACKEND_START_NAMESPACE | CARLA_BACKEND_START_NAMESPACE | ||||
| // ------------------------------------------------------------------------------------------------------------------- | // ------------------------------------------------------------------------------------------------------------------- | ||||
| @@ -59,14 +54,6 @@ static void initRtAudioAPIsIfNeeded() | |||||
| for (const RtAudio::Api& api : apis) | for (const RtAudio::Api& api : apis) | ||||
| { | { | ||||
| if (api == RtAudio::MACOSX_CORE) | |||||
| continue; | |||||
| if (api == RtAudio::WINDOWS_ASIO) | |||||
| continue; | |||||
| if (api == RtAudio::WINDOWS_DS) | |||||
| continue; | |||||
| if (api == RtAudio::WINDOWS_WASAPI) | |||||
| continue; | |||||
| if (api == RtAudio::UNIX_JACK && ! jackbridge_is_ok()) | if (api == RtAudio::UNIX_JACK && ! jackbridge_is_ok()) | ||||
| continue; | continue; | ||||
| @@ -164,8 +151,8 @@ public: | |||||
| fAudioOutCount(0), | fAudioOutCount(0), | ||||
| fLastEventTime(0), | fLastEventTime(0), | ||||
| fDeviceName(), | fDeviceName(), | ||||
| fAudioIntBufIn(), | |||||
| fAudioIntBufOut(), | |||||
| fAudioIntBufIn(nullptr), | |||||
| fAudioIntBufOut(nullptr), | |||||
| fMidiIns(), | fMidiIns(), | ||||
| fMidiInEvents(), | fMidiInEvents(), | ||||
| fMidiOuts(), | fMidiOuts(), | ||||
| @@ -288,8 +275,11 @@ public: | |||||
| fAudioOutCount = oParams.nChannels; | fAudioOutCount = oParams.nChannels; | ||||
| fLastEventTime = 0; | fLastEventTime = 0; | ||||
| fAudioIntBufIn.setSize(static_cast<int>(fAudioInCount), static_cast<int>(bufferFrames)); | |||||
| fAudioIntBufOut.setSize(static_cast<int>(fAudioOutCount), static_cast<int>(bufferFrames)); | |||||
| if (fAudioInCount > 0) | |||||
| fAudioIntBufIn = new float[fAudioInCount*bufferFrames]; | |||||
| if (fAudioOutCount > 0) | |||||
| fAudioIntBufOut = new float[fAudioOutCount*bufferFrames]; | |||||
| pData->graph.create(fAudioInCount, fAudioOutCount); | pData->graph.create(fAudioInCount, fAudioOutCount); | ||||
| @@ -370,6 +360,18 @@ public: | |||||
| fLastEventTime = 0; | fLastEventTime = 0; | ||||
| fDeviceName.clear(); | fDeviceName.clear(); | ||||
| if (fAudioIntBufIn != nullptr) | |||||
| { | |||||
| delete[] fAudioIntBufIn; | |||||
| fAudioIntBufIn = nullptr; | |||||
| } | |||||
| if (fAudioIntBufOut != nullptr) | |||||
| { | |||||
| delete[] fAudioIntBufOut; | |||||
| fAudioIntBufOut = nullptr; | |||||
| } | |||||
| // close stream | // close stream | ||||
| if (fAudio.isStreamOpen()) | if (fAudio.isStreamOpen()) | ||||
| fAudio.closeStream(); | fAudio.closeStream(); | ||||
| @@ -400,8 +402,7 @@ public: | |||||
| // ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
| // Patchbay | // Patchbay | ||||
| template<class Graph> | |||||
| bool refreshExternalGraphPorts(Graph* const graph, const bool sendCallback) | |||||
| bool refreshExternalGraphPorts(RackGraph* const graph, const bool sendCallback) | |||||
| { | { | ||||
| CARLA_SAFE_ASSERT_RETURN(graph != nullptr, false); | CARLA_SAFE_ASSERT_RETURN(graph != nullptr, false); | ||||
| @@ -528,7 +529,7 @@ public: | |||||
| { | { | ||||
| CARLA_SAFE_ASSERT_RETURN(pData->graph.isReady(), false); | CARLA_SAFE_ASSERT_RETURN(pData->graph.isReady(), false); | ||||
| return refreshExternalGraphPorts<RackGraph>(pData->graph.getRackGraph(), true); | |||||
| return refreshExternalGraphPorts(pData->graph.getRackGraph(), true); | |||||
| } | } | ||||
| // ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
| @@ -554,13 +555,13 @@ protected: | |||||
| { | { | ||||
| float* inBuf2[fAudioInCount]; | float* inBuf2[fAudioInCount]; | ||||
| for (int i=0, count=static_cast<int>(fAudioInCount); i<count; ++i) | |||||
| for (uint i=0, count=fAudioInCount; i<count; ++i) | |||||
| { | { | ||||
| inBuf [i] = fAudioIntBufIn.getReadPointer(i); | |||||
| inBuf2[i] = fAudioIntBufIn.getWritePointer(i); | |||||
| inBuf [i] = fAudioIntBufIn + (nframes*i); | |||||
| inBuf2[i] = fAudioIntBufIn + (nframes*i); | |||||
| } | } | ||||
| for (int i=0, count=static_cast<int>(fAudioOutCount); i<count; ++i) | |||||
| outBuf[i] = fAudioIntBufOut.getWritePointer(i); | |||||
| for (uint i=0, count=fAudioOutCount; i<count; ++i) | |||||
| outBuf[i] = fAudioIntBufOut + (nframes*i); | |||||
| // init input | // init input | ||||
| for (uint i=0; i<nframes; ++i) | for (uint i=0; i<nframes; ++i) | ||||
| @@ -568,7 +569,7 @@ protected: | |||||
| inBuf2[j][i] = insPtr[i*fAudioInCount+j]; | inBuf2[j][i] = insPtr[i*fAudioInCount+j]; | ||||
| // clear output | // clear output | ||||
| fAudioIntBufOut.clear(); | |||||
| carla_zeroFloats(fAudioIntBufOut, fAudioOutCount*nframes); | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| @@ -578,7 +579,7 @@ protected: | |||||
| outBuf[i] = outsPtr+(nframes*i); | outBuf[i] = outsPtr+(nframes*i); | ||||
| // clear output | // clear output | ||||
| FloatVectorOperations::clear(outsPtr, static_cast<int>(nframes*fAudioOutCount)); | |||||
| carla_zeroFloats(outsPtr, nframes*fAudioOutCount); | |||||
| } | } | ||||
| // initialize events | // initialize events | ||||
| @@ -909,8 +910,8 @@ private: | |||||
| CarlaString fDeviceName; | CarlaString fDeviceName; | ||||
| // temp buffer for interleaved audio | // temp buffer for interleaved audio | ||||
| AudioSampleBuffer fAudioIntBufIn; | |||||
| AudioSampleBuffer fAudioIntBufOut; | |||||
| float* fAudioIntBufIn; | |||||
| float* fAudioIntBufOut; | |||||
| struct MidiInPort { | struct MidiInPort { | ||||
| RtMidiIn* port; | RtMidiIn* port; | ||||
| @@ -1008,24 +1009,27 @@ CarlaEngine* CarlaEngine::newRtAudio(const AudioApi api) | |||||
| case AUDIO_API_JACK: | case AUDIO_API_JACK: | ||||
| rtApi = RtAudio::UNIX_JACK; | rtApi = RtAudio::UNIX_JACK; | ||||
| break; | break; | ||||
| case AUDIO_API_ALSA: | |||||
| rtApi = RtAudio::LINUX_ALSA; | |||||
| break; | |||||
| case AUDIO_API_OSS: | case AUDIO_API_OSS: | ||||
| rtApi = RtAudio::LINUX_OSS; | rtApi = RtAudio::LINUX_OSS; | ||||
| break; | break; | ||||
| case AUDIO_API_PULSE: | |||||
| case AUDIO_API_ALSA: | |||||
| rtApi = RtAudio::LINUX_ALSA; | |||||
| break; | |||||
| case AUDIO_API_PULSEAUDIO: | |||||
| rtApi = RtAudio::LINUX_PULSE; | rtApi = RtAudio::LINUX_PULSE; | ||||
| break; | break; | ||||
| case AUDIO_API_CORE: | |||||
| case AUDIO_API_COREAUDIO: | |||||
| rtApi = RtAudio::MACOSX_CORE; | rtApi = RtAudio::MACOSX_CORE; | ||||
| break; | break; | ||||
| case AUDIO_API_ASIO: | case AUDIO_API_ASIO: | ||||
| rtApi = RtAudio::WINDOWS_ASIO; | rtApi = RtAudio::WINDOWS_ASIO; | ||||
| break; | break; | ||||
| case AUDIO_API_DS: | |||||
| case AUDIO_API_DIRECTSOUND: | |||||
| rtApi = RtAudio::WINDOWS_DS; | rtApi = RtAudio::WINDOWS_DS; | ||||
| break; | break; | ||||
| case AUDIO_API_WASAPI: | |||||
| rtApi = RtAudio::WINDOWS_WASAPI; | |||||
| break; | |||||
| } | } | ||||
| return new CarlaEngineRtAudio(rtApi); | return new CarlaEngineRtAudio(rtApi); | ||||
| @@ -20,13 +20,6 @@ | |||||
| #include "CarlaPluginUI.hpp" | #include "CarlaPluginUI.hpp" | ||||
| #if defined(CARLA_OS_WIN) || defined(CARLA_OS_MAC) | |||||
| # include "AppConfig.h" | |||||
| # include "juce_events/juce_events.h" | |||||
| using juce::MessageManager; | |||||
| using juce::ScopedJuceInitialiser_GUI; | |||||
| #endif | |||||
| CARLA_BRIDGE_START_NAMESPACE | CARLA_BRIDGE_START_NAMESPACE | ||||
| // ------------------------------------------------------------------------- | // ------------------------------------------------------------------------- | ||||
| @@ -39,9 +32,6 @@ public: | |||||
| : CarlaBridgeToolkit(u), | : CarlaBridgeToolkit(u), | ||||
| fUI(nullptr), | fUI(nullptr), | ||||
| fIdling(false) | fIdling(false) | ||||
| #if defined(CARLA_OS_WIN) || defined(CARLA_OS_MAC) | |||||
| , kJuceInit() | |||||
| #endif | |||||
| { | { | ||||
| carla_debug("CarlaBridgeToolkitPlugin::CarlaBridgeToolkitPlugin(%p)", u); | carla_debug("CarlaBridgeToolkitPlugin::CarlaBridgeToolkitPlugin(%p)", u); | ||||
| } | } | ||||
| @@ -60,9 +50,9 @@ public: | |||||
| const CarlaBridgeUI::Options& options(ui->getOptions()); | const CarlaBridgeUI::Options& options(ui->getOptions()); | ||||
| #if defined(CARLA_OS_MAC) && defined(BRIDGE_COCOA) | #if defined(CARLA_OS_MAC) && defined(BRIDGE_COCOA) | ||||
| fUI = CarlaPluginUI::newCocoa(this, 0, options.isResizable); | |||||
| fUI = nullptr; | |||||
| #elif defined(CARLA_OS_WIN) && defined(BRIDGE_HWND) | #elif defined(CARLA_OS_WIN) && defined(BRIDGE_HWND) | ||||
| fUI = CarlaPluginUI::newWindows(this, 0, options.isResizable); | |||||
| fUI = nullptr; | |||||
| #elif defined(HAVE_X11) && defined(BRIDGE_X11) | #elif defined(HAVE_X11) && defined(BRIDGE_X11) | ||||
| fUI = CarlaPluginUI::newX11(this, 0, options.isResizable); | fUI = CarlaPluginUI::newX11(this, 0, options.isResizable); | ||||
| #endif | #endif | ||||
| @@ -99,15 +89,8 @@ public: | |||||
| ui->idlePipe(); | ui->idlePipe(); | ||||
| ui->idleUI(); | ui->idleUI(); | ||||
| fUI->idle(); | fUI->idle(); | ||||
| #if defined(CARLA_OS_WIN) || defined(CARLA_OS_MAC) | |||||
| if (MessageManager* const msgMgr = MessageManager::getInstance()) | |||||
| msgMgr->runDispatchLoopUntil(20); | |||||
| #else | |||||
| carla_msleep(20); | carla_msleep(20); | ||||
| #endif | |||||
| } | } | ||||
| } | } | ||||
| @@ -202,10 +185,6 @@ private: | |||||
| CarlaPluginUI* fUI; | CarlaPluginUI* fUI; | ||||
| bool fIdling; | bool fIdling; | ||||
| #if defined(CARLA_OS_WIN) || defined(CARLA_OS_MAC) | |||||
| const ScopedJuceInitialiser_GUI kJuceInit; | |||||
| #endif | |||||
| CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CarlaBridgeToolkitPlugin) | CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CarlaBridgeToolkitPlugin) | ||||
| }; | }; | ||||
| @@ -220,7 +199,6 @@ CarlaBridgeToolkit* CarlaBridgeToolkit::createNew(CarlaBridgeUI* const ui) | |||||
| CARLA_BRIDGE_END_NAMESPACE | CARLA_BRIDGE_END_NAMESPACE | ||||
| #define CARLA_PLUGIN_UI_WITHOUT_JUCE_PROCESSORS | |||||
| #include "CarlaPluginUI.cpp" | #include "CarlaPluginUI.cpp" | ||||
| // ------------------------------------------------------------------------- | // ------------------------------------------------------------------------- | ||||
| @@ -132,18 +132,6 @@ LIBS = \ | |||||
| $(MODULEDIR)/juce_core.a \ | $(MODULEDIR)/juce_core.a \ | ||||
| $(MODULEDIR)/lilv.a | $(MODULEDIR)/lilv.a | ||||
| LIBS_JUCE = \ | |||||
| $(LIBS) \ | |||||
| $(MODULEDIR)/juce_data_structures.a \ | |||||
| $(MODULEDIR)/juce_events.a \ | |||||
| $(MODULEDIR)/juce_graphics.a \ | |||||
| $(MODULEDIR)/juce_gui_basics.a | |||||
| ifeq ($(MACOS),true) | |||||
| LIBS_JUCE += \ | |||||
| $(MODULEDIR)/juce_gui_extra.a | |||||
| endif | |||||
| # ---------------------------------------------------------------------------------------------------------------------------- | # ---------------------------------------------------------------------------------------------------------------------------- | ||||
| # Common objects | # Common objects | ||||
| @@ -280,10 +268,10 @@ OBJS_COCOA = \ | |||||
| $(OBJDIR)/CarlaBridgeUI-LV2.cpp-cocoa.o \ | $(OBJDIR)/CarlaBridgeUI-LV2.cpp-cocoa.o \ | ||||
| $(OBJDIR)/CarlaBridgeToolkitPlugin.cpp-cocoa.o | $(OBJDIR)/CarlaBridgeToolkitPlugin.cpp-cocoa.o | ||||
| $(BINDIR)/$(MODULENAME)-lv2-cocoa: $(OBJS_COCOA) $(LIBS_JUCE) | |||||
| $(BINDIR)/$(MODULENAME)-lv2-cocoa: $(OBJS_COCOA) $(LIBS) | |||||
| -@mkdir -p $(BINDIR) | -@mkdir -p $(BINDIR) | ||||
| @echo "Linking $(MODULENAME)-lv2-cocoa" | @echo "Linking $(MODULENAME)-lv2-cocoa" | ||||
| @$(CXX) $(OBJS_COCOA) $(LIBS_START) $(LIBS_JUCE) $(LIBS_END) $(LINK_COCOA_FLAGS) -o $@ | |||||
| @$(CXX) $(OBJS_COCOA) $(LIBS_START) $(LIBS) $(LIBS_END) $(LINK_COCOA_FLAGS) -o $@ | |||||
| $(OBJDIR)/%.cpp-cocoa.o: %.cpp | $(OBJDIR)/%.cpp-cocoa.o: %.cpp | ||||
| -@mkdir -p $(OBJDIR) | -@mkdir -p $(OBJDIR) | ||||
| @@ -300,10 +288,10 @@ OBJS_WINDOWS = \ | |||||
| $(OBJDIR)/CarlaBridgeUI-LV2.cpp-windows.o \ | $(OBJDIR)/CarlaBridgeUI-LV2.cpp-windows.o \ | ||||
| $(OBJDIR)/CarlaBridgeToolkitPlugin.cpp-windows.o | $(OBJDIR)/CarlaBridgeToolkitPlugin.cpp-windows.o | ||||
| $(BINDIR)/$(MODULENAME)-lv2-windows.exe: $(OBJS_WINDOWS) $(LIBS_JUCE) | |||||
| $(BINDIR)/$(MODULENAME)-lv2-windows.exe: $(OBJS_WINDOWS) $(LIBS) | |||||
| -@mkdir -p $(BINDIR) | -@mkdir -p $(BINDIR) | ||||
| @echo "Linking $(MODULENAME)-lv2-windows.exe" | @echo "Linking $(MODULENAME)-lv2-windows.exe" | ||||
| @$(CXX) $(OBJS_WINDOWS) $(LIBS_START) $(LIBS_JUCE) $(LIBS_END) $(LINK_WINDOWS_FLAGS) -o $@ | |||||
| @$(CXX) $(OBJS_WINDOWS) $(LIBS_START) $(LIBS) $(LIBS_END) $(LINK_WINDOWS_FLAGS) -o $@ | |||||
| $(OBJDIR)/%.cpp-windows.o: %.cpp | $(OBJDIR)/%.cpp-windows.o: %.cpp | ||||
| -@mkdir -p $(OBJDIR) | -@mkdir -p $(OBJDIR) | ||||
| @@ -11,7 +11,8 @@ include ../Makefile.mk | |||||
| # ---------------------------------------------------------------------------------------------------------------------------- | # ---------------------------------------------------------------------------------------------------------------------------- | ||||
| BUILD_CXX_FLAGS += $(HYLIA_FLAGS) -I$(CWD) -Ilink | BUILD_CXX_FLAGS += $(HYLIA_FLAGS) -I$(CWD) -Ilink | ||||
| BUILD_CXX_FLAGS += -Wno-multichar -Wno-unused-variable -Wno-uninitialized -Wno-missing-field-initializers | |||||
| BUILD_CXX_FLAGS += -Wno-multichar -Wno-unused-parameter -Wno-unused-variable -Wno-uninitialized | |||||
| BUILD_CXX_FLAGS += -Wno-missing-field-initializers | |||||
| # ---------------------------------------------------------------------------------------------------------------------------- | # ---------------------------------------------------------------------------------------------------------------------------- | ||||
| @@ -10,7 +10,11 @@ include ../Makefile.mk | |||||
| # ---------------------------------------------------------------------------------------------------------------------------- | # ---------------------------------------------------------------------------------------------------------------------------- | ||||
| BUILD_CXX_FLAGS += $(RTAUDIO_FLAGS) -I$(CWD) -w | |||||
| BUILD_CXX_FLAGS += $(RTAUDIO_FLAGS) -I$(CWD) -Iinclude | |||||
| ifeq ($(WIN32),true) | |||||
| BUILD_CXX_FLAGS += -Wno-unused-function -Wno-unused-but-set-variable | |||||
| endif | |||||
| # ---------------------------------------------------------------------------------------------------------------------------- | # ---------------------------------------------------------------------------------------------------------------------------- | ||||
| @@ -2630,10 +2630,10 @@ bool RtApiJack :: callbackEvent( unsigned long nframes ) | |||||
| // on information found in | // on information found in | ||||
| // http://www.cs.wustl.edu/~schmidt/win32-cv-1.html. | // http://www.cs.wustl.edu/~schmidt/win32-cv-1.html. | ||||
| #include "asiosys.h" | |||||
| #include "asio.h" | |||||
| #include "iasiothiscallresolver.h" | |||||
| #include "asiodrivers.h" | |||||
| #include "asio.cpp" | |||||
| #include "asiodrivers.cpp" | |||||
| #include "asiolist.cpp" | |||||
| #include "iasiothiscallresolver.cpp" | |||||
| #include <cmath> | #include <cmath> | ||||
| static AsioDrivers drivers; | static AsioDrivers drivers; | ||||
| @@ -3600,7 +3600,7 @@ static const char* getAsioErrorString( ASIOError result ) | |||||
| #include <audioclient.h> | #include <audioclient.h> | ||||
| #include <avrt.h> | #include <avrt.h> | ||||
| #include <mmdeviceapi.h> | #include <mmdeviceapi.h> | ||||
| #include <functiondiscoverykeys_devpkey.h> | |||||
| #include <FunctionDiscoveryKeys_devpkey.h> | |||||
| //============================================================================= | //============================================================================= | ||||
| @@ -1,3 +1,4 @@ | |||||
| #pragma once | |||||
| #include "asiosys.h" | #include "asiosys.h" | ||||
| #include "asio.h" | #include "asio.h" | ||||