| @@ -20,7 +20,7 @@ | |||||
| #include <cstdint> | #include <cstdint> | ||||
| #include "carla_defines.h" | |||||
| #include "carla_defines.hpp" | |||||
| #define CARLA_BACKEND_START_NAMESPACE namespace CarlaBackend { | #define CARLA_BACKEND_START_NAMESPACE namespace CarlaBackend { | ||||
| #define CARLA_BACKEND_END_NAMESPACE } | #define CARLA_BACKEND_END_NAMESPACE } | ||||
| @@ -19,7 +19,7 @@ | |||||
| #define CARLA_OSC_H | #define CARLA_OSC_H | ||||
| #include "carla_backend.h" | #include "carla_backend.h" | ||||
| #include "carla_osc_utils.h" | |||||
| #include "carla_osc_utils.hpp" | |||||
| #define CARLA_OSC_HANDLE_ARGS1 CarlaPlugin* const plugin | #define CARLA_OSC_HANDLE_ARGS1 CarlaPlugin* const plugin | ||||
| #define CARLA_OSC_HANDLE_ARGS2 CARLA_OSC_HANDLE_ARGS1, const int argc, const lo_arg* const* const argv, const char* const types | #define CARLA_OSC_HANDLE_ARGS2 CARLA_OSC_HANDLE_ARGS1, const int argc, const lo_arg* const* const argv, const char* const types | ||||
| @@ -22,7 +22,7 @@ | |||||
| #include "carla_midi.h" | #include "carla_midi.h" | ||||
| #include "carla_shared.h" | #include "carla_shared.h" | ||||
| #include "carla_lib_utils.h" | |||||
| #include "carla_lib_utils.hpp" | |||||
| #ifdef BUILD_BRIDGE | #ifdef BUILD_BRIDGE | ||||
| # include "carla_bridge_osc.h" | # include "carla_bridge_osc.h" | ||||
| @@ -19,7 +19,7 @@ | |||||
| #ifdef WANT_DSSI | #ifdef WANT_DSSI | ||||
| #include "carla_ladspa_utils.h" | |||||
| #include "carla_ladspa_utils.hpp" | |||||
| #include "dssi/dssi.h" | #include "dssi/dssi.h" | ||||
| CARLA_BACKEND_START_NAMESPACE | CARLA_BACKEND_START_NAMESPACE | ||||
| @@ -19,7 +19,7 @@ | |||||
| #ifdef WANT_LADSPA | #ifdef WANT_LADSPA | ||||
| #include "carla_ladspa_utils.h" | |||||
| #include "carla_ladspa_utils.hpp" | |||||
| CARLA_BACKEND_START_NAMESPACE | CARLA_BACKEND_START_NAMESPACE | ||||
| @@ -25,7 +25,139 @@ | |||||
| #ifdef WANT_LINUXSAMPLER | #ifdef WANT_LINUXSAMPLER | ||||
| #include "carla_linuxsampler_utils.h" | |||||
| #include "linuxsampler/EngineFactory.h" | |||||
| #include <linuxsampler/Sampler.h> | |||||
| namespace LinuxSampler { | |||||
| // ----------------------------------------------------------------------- | |||||
| // LinuxSampler static values | |||||
| static const float VOLUME_MAX = 3.16227766f; // +10 dB | |||||
| static const float VOLUME_MIN = 0.0f; // -inf dB | |||||
| // ----------------------------------------------------------------------- | |||||
| // LinuxSampler AudioOutputDevice Plugin | |||||
| class AudioOutputDevicePlugin : public AudioOutputDevice | |||||
| { | |||||
| public: | |||||
| AudioOutputDevicePlugin(CarlaBackend::CarlaEngine* const engine, CarlaBackend::CarlaPlugin* const plugin) | |||||
| : AudioOutputDevice(std::map<String, DeviceCreationParameter*>()), | |||||
| m_engine(engine), | |||||
| m_plugin(plugin) | |||||
| { | |||||
| CARLA_ASSERT(engine); | |||||
| CARLA_ASSERT(plugin); | |||||
| } | |||||
| // ------------------------------------------------------------------- | |||||
| // LinuxSampler virtual methods | |||||
| void Play() | |||||
| { | |||||
| } | |||||
| bool IsPlaying() | |||||
| { | |||||
| return m_engine->isRunning() && m_plugin->enabled(); | |||||
| } | |||||
| void Stop() | |||||
| { | |||||
| } | |||||
| uint MaxSamplesPerCycle() | |||||
| { | |||||
| return m_engine->getBufferSize(); | |||||
| } | |||||
| uint SampleRate() | |||||
| { | |||||
| return m_engine->getSampleRate(); | |||||
| } | |||||
| String Driver() | |||||
| { | |||||
| return "AudioOutputDevicePlugin"; | |||||
| } | |||||
| AudioChannel* CreateChannel(uint channelNr) | |||||
| { | |||||
| return new AudioChannel(channelNr, nullptr, 0); | |||||
| } | |||||
| // ------------------------------------------------------------------- | |||||
| // Give public access to the RenderAudio call | |||||
| int Render(uint samples) | |||||
| { | |||||
| return RenderAudio(samples); | |||||
| } | |||||
| private: | |||||
| CarlaBackend::CarlaEngine* const m_engine; | |||||
| CarlaBackend::CarlaPlugin* const m_plugin; | |||||
| }; | |||||
| // ----------------------------------------------------------------------- | |||||
| // LinuxSampler MidiInputDevice Plugin | |||||
| class MidiInputDevicePlugin : public MidiInputDevice | |||||
| { | |||||
| public: | |||||
| MidiInputDevicePlugin(Sampler* const sampler) | |||||
| : MidiInputDevice(std::map<String, DeviceCreationParameter*>(), sampler) | |||||
| { | |||||
| } | |||||
| // ------------------------------------------------------------------- | |||||
| // LinuxSampler virtual methods | |||||
| void Listen() | |||||
| { | |||||
| } | |||||
| void StopListen() | |||||
| { | |||||
| } | |||||
| String Driver() | |||||
| { | |||||
| return "MidiInputDevicePlugin"; | |||||
| } | |||||
| MidiInputPort* CreateMidiPort() | |||||
| { | |||||
| return new MidiInputPortPlugin(this, Ports.size()); | |||||
| } | |||||
| // ------------------------------------------------------------------- | |||||
| // Properly delete port (deconstructor is protected) | |||||
| void DeleteMidiPort(MidiInputPort* const port) | |||||
| { | |||||
| delete (MidiInputPortPlugin*)port; | |||||
| } | |||||
| // ------------------------------------------------------------------- | |||||
| // MIDI Port implementation for this plugin MIDI input driver | |||||
| // (Constructor and deconstructor are protected) | |||||
| class MidiInputPortPlugin : public MidiInputPort | |||||
| { | |||||
| protected: | |||||
| MidiInputPortPlugin(MidiInputDevicePlugin* const device, const int portNumber) | |||||
| : MidiInputPort(device, portNumber) | |||||
| { | |||||
| } | |||||
| friend class MidiInputDevicePlugin; | |||||
| }; | |||||
| }; | |||||
| } // namespace LinuxSampler | |||||
| // ----------------------------------------------------------------------- | |||||
| #include <QtCore/QFileInfo> | #include <QtCore/QFileInfo> | ||||
| @@ -19,9 +19,9 @@ | |||||
| #ifdef WANT_LV2 | #ifdef WANT_LV2 | ||||
| #include "carla_lv2.h" | |||||
| #include "carla_lv2_utils.hpp" | |||||
| #include "lv2_atom_queue.h" | |||||
| #include "lv2_atom_queue.hpp" | |||||
| #include "rtmempool/rtmempool.h" | #include "rtmempool/rtmempool.h" | ||||
| #include <set> | #include <set> | ||||
| @@ -19,7 +19,7 @@ | |||||
| #define CARLA_NATIVE_MM_H | #define CARLA_NATIVE_MM_H | ||||
| #include "carla_native.h" | #include "carla_native.h" | ||||
| #include "carla_utils.h" | |||||
| #include "carla_utils.hpp" | |||||
| class PluginDescriptorClass { | class PluginDescriptorClass { | ||||
| public: | public: | ||||
| @@ -48,22 +48,22 @@ HEADERS = \ | |||||
| ../carla_threads.h \ | ../carla_threads.h \ | ||||
| ../plugins/carla_native.h \ | ../plugins/carla_native.h \ | ||||
| ../plugins/carla_nativemm.h \ | ../plugins/carla_nativemm.h \ | ||||
| ../../carla-jackbridge/carla_jackbridge.h \ | |||||
| ../../carla-includes/carla_defines.h \ | |||||
| ../../carla-includes/carla_defines.hpp \ | |||||
| ../../carla-includes/carla_midi.h \ | ../../carla-includes/carla_midi.h \ | ||||
| ../../carla-includes/carla_utils.h \ | |||||
| ../../carla-includes/carla_lib_utils.h \ | |||||
| ../../carla-includes/carla_osc_utils.h \ | |||||
| ../../carla-includes/carla_ladspa_utils.h \ | |||||
| ../../carla-includes/carla_lv2.h \ | |||||
| ../../carla-includes/carla_vst_utils.h \ | |||||
| ../../carla-includes/carla_linuxsampler_utils.h \ | |||||
| ../../carla-includes/ladspa_rdf.h \ | |||||
| ../../carla-includes/lv2_rdf.h | |||||
| ../../carla-includes/ladspa_rdf.hpp \ | |||||
| ../../carla-includes/lv2_rdf.hpp \ | |||||
| ../../carla-utils/carla_utils.hpp \ | |||||
| ../../carla-utils/carla_lib_utils.hpp \ | |||||
| ../../carla-utils/carla_osc_utils.hpp \ | |||||
| ../../carla-utils/carla_ladspa_utils.hpp \ | |||||
| ../../carla-utils/carla_lv2_utils.hpp \ | |||||
| ../../carla-utils/carla_vst_utils.hpp \ | |||||
| ../../carla-utils/carla_linuxsampler_utils.hpp | |||||
| INCLUDEPATH = .. \ | INCLUDEPATH = .. \ | ||||
| ../../carla-jackbridge \ | ../../carla-jackbridge \ | ||||
| ../../carla-includes \ | ../../carla-includes \ | ||||
| ../../carla-utils \ | |||||
| ../distrho-plugin-toolkit | ../distrho-plugin-toolkit | ||||
| LIBS = -ldl \ | LIBS = -ldl \ | ||||
| @@ -19,7 +19,7 @@ | |||||
| #ifdef WANT_VST | #ifdef WANT_VST | ||||
| #include "carla_vst_utils.h" | |||||
| #include "carla_vst_utils.hpp" | |||||
| #ifdef Q_WS_X11 | #ifdef Q_WS_X11 | ||||
| # include <QtGui/QX11Info> | # include <QtGui/QX11Info> | ||||
| @@ -15,8 +15,8 @@ | |||||
| * For a full copy of the GNU General Public License see the COPYING file | * For a full copy of the GNU General Public License see the COPYING file | ||||
| */ | */ | ||||
| #ifndef CARLA_DEFINES_H | |||||
| #define CARLA_DEFINES_H | |||||
| #ifndef CARLA_DEFINES_HPP | |||||
| #define CARLA_DEFINES_HPP | |||||
| #ifdef __WINE__ | #ifdef __WINE__ | ||||
| # define Q_CORE_EXPORT | # define Q_CORE_EXPORT | ||||
| @@ -26,7 +26,7 @@ | |||||
| #include <QtCore/Qt> | #include <QtCore/Qt> | ||||
| // TESTING - remove later (QtCreator doesn't fully support this) | |||||
| // TESTING - remove later (QtCreator doesn't fully support this yet) | |||||
| #ifdef QTCREATOR_TEST | #ifdef QTCREATOR_TEST | ||||
| # undef Q_COMPILER_INITIALIZER_LISTS | # undef Q_COMPILER_INITIALIZER_LISTS | ||||
| #endif | #endif | ||||
| @@ -39,7 +39,6 @@ | |||||
| // Common includes and macros | // Common includes and macros | ||||
| #ifdef Q_OS_WIN | #ifdef Q_OS_WIN | ||||
| # include <windows.h> | # include <windows.h> | ||||
| //# define uintptr_t size_t // FIXME | |||||
| #else | #else | ||||
| # include <unistd.h> | # include <unistd.h> | ||||
| # ifndef __cdecl | # ifndef __cdecl | ||||
| @@ -103,4 +102,4 @@ | |||||
| # endif | # endif | ||||
| #endif | #endif | ||||
| #endif // CARLA_DEFINES_H | |||||
| #endif // CARLA_DEFINES_HPP | |||||
| @@ -1,180 +0,0 @@ | |||||
| /* | |||||
| * Carla LinuxSampler utils | |||||
| * Copyright (C) 2012 Filipe Coelho <falktx@falktx.com> | |||||
| * | |||||
| * This program is free software; you can redistribute it and/or modify | |||||
| * it under the terms of the GNU General Public License as published by | |||||
| * the Free Software Foundation; either version 2 of the License, or | |||||
| * any later version. | |||||
| * | |||||
| * This program is distributed in the hope that it will be useful, | |||||
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | |||||
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||||
| * GNU General Public License for more details. | |||||
| * | |||||
| * For a full copy of the GNU General Public License see the COPYING file | |||||
| */ | |||||
| #ifndef CARLA_LINUXSAMPLER_UTILS_H | |||||
| #define CARLA_LINUXSAMPLER_UTILS_H | |||||
| #include <linuxsampler/engines/Engine.h> | |||||
| #include <linuxsampler/Sampler.h> | |||||
| #include <set> | |||||
| #include <vector> | |||||
| namespace LinuxSampler { | |||||
| // ----------------------------------------------------------------------- | |||||
| class EngineFactory | |||||
| { | |||||
| public: | |||||
| static std::vector<String> AvailableEngineTypes(); | |||||
| static String AvailableEngineTypesAsString(); | |||||
| static Engine* Create(String EngineType) throw (Exception); | |||||
| static void Destroy(Engine* pEngine); | |||||
| static const std::set<Engine*>& EngineInstances(); | |||||
| protected: | |||||
| static void Erase(Engine* pEngine); | |||||
| friend class Engine; | |||||
| }; | |||||
| #ifndef BUILD_NATIVE | |||||
| #include "carla_plugin.h" | |||||
| // ----------------------------------------------------------------------- | |||||
| // LinuxSampler static values | |||||
| static const float VOLUME_MAX = 3.16227766f; // +10 dB | |||||
| static const float VOLUME_MIN = 0.0f; // -inf dB | |||||
| // ----------------------------------------------------------------------- | |||||
| // LinuxSampler AudioOutputDevice Plugin | |||||
| class AudioOutputDevicePlugin : public AudioOutputDevice | |||||
| { | |||||
| public: | |||||
| AudioOutputDevicePlugin(CarlaBackend::CarlaEngine* const engine, CarlaBackend::CarlaPlugin* const plugin) | |||||
| : AudioOutputDevice(std::map<String, DeviceCreationParameter*>()), | |||||
| m_engine(engine), | |||||
| m_plugin(plugin) | |||||
| { | |||||
| CARLA_ASSERT(engine); | |||||
| CARLA_ASSERT(plugin); | |||||
| } | |||||
| // ------------------------------------------------------------------- | |||||
| // LinuxSampler virtual methods | |||||
| void Play() | |||||
| { | |||||
| } | |||||
| bool IsPlaying() | |||||
| { | |||||
| return m_engine->isRunning() && m_plugin->enabled(); | |||||
| } | |||||
| void Stop() | |||||
| { | |||||
| } | |||||
| uint MaxSamplesPerCycle() | |||||
| { | |||||
| return m_engine->getBufferSize(); | |||||
| } | |||||
| uint SampleRate() | |||||
| { | |||||
| return m_engine->getSampleRate(); | |||||
| } | |||||
| String Driver() | |||||
| { | |||||
| return "AudioOutputDevicePlugin"; | |||||
| } | |||||
| AudioChannel* CreateChannel(uint channelNr) | |||||
| { | |||||
| return new AudioChannel(channelNr, nullptr, 0); | |||||
| } | |||||
| // ------------------------------------------------------------------- | |||||
| // Give public access to the RenderAudio call | |||||
| int Render(uint samples) | |||||
| { | |||||
| return RenderAudio(samples); | |||||
| } | |||||
| private: | |||||
| CarlaBackend::CarlaEngine* const m_engine; | |||||
| CarlaBackend::CarlaPlugin* const m_plugin; | |||||
| }; | |||||
| // ----------------------------------------------------------------------- | |||||
| // LinuxSampler MidiInputDevice Plugin | |||||
| class MidiInputDevicePlugin : public MidiInputDevice | |||||
| { | |||||
| public: | |||||
| MidiInputDevicePlugin(Sampler* const sampler) | |||||
| : MidiInputDevice(std::map<String, DeviceCreationParameter*>(), sampler) | |||||
| { | |||||
| } | |||||
| // ------------------------------------------------------------------- | |||||
| // LinuxSampler virtual methods | |||||
| void Listen() | |||||
| { | |||||
| } | |||||
| void StopListen() | |||||
| { | |||||
| } | |||||
| String Driver() | |||||
| { | |||||
| return "MidiInputDevicePlugin"; | |||||
| } | |||||
| MidiInputPort* CreateMidiPort() | |||||
| { | |||||
| return new MidiInputPortPlugin(this, Ports.size()); | |||||
| } | |||||
| // ------------------------------------------------------------------- | |||||
| // Properly delete port (deconstructor is protected) | |||||
| void DeleteMidiPort(MidiInputPort* const port) | |||||
| { | |||||
| delete (MidiInputPortPlugin*)port; | |||||
| } | |||||
| // ------------------------------------------------------------------- | |||||
| // MIDI Port implementation for this plugin MIDI input driver | |||||
| // (Constructor and deconstructor are protected) | |||||
| class MidiInputPortPlugin : public MidiInputPort | |||||
| { | |||||
| protected: | |||||
| MidiInputPortPlugin(MidiInputDevicePlugin* const device, const int portNumber) | |||||
| : MidiInputPort(device, portNumber) | |||||
| { | |||||
| } | |||||
| friend class MidiInputDevicePlugin; | |||||
| }; | |||||
| }; | |||||
| // ----------------------------------------------------------------------- | |||||
| #endif // ! BUILD_NATIVE | |||||
| } // namespace LinuxSampler | |||||
| #endif // CARLA_LINUXSAMPLER_UTILS_H | |||||
| @@ -0,0 +1,46 @@ | |||||
| /*************************************************************************** | |||||
| * * | |||||
| * Copyright (C) 2005-2007 Christian Schoenebeck * | |||||
| * * | |||||
| * This program is free software; you can redistribute it and/or modify * | |||||
| * it under the terms of the GNU General Public License as published by * | |||||
| * the Free Software Foundation; either version 2 of the License, or * | |||||
| * (at your option) any later version. * | |||||
| * * | |||||
| * This program is distributed in the hope that it will be useful, * | |||||
| * but WITHOUT ANY WARRANTY; without even the implied warranty of * | |||||
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | |||||
| * GNU General Public License for more details. * | |||||
| * * | |||||
| * You should have received a copy of the GNU General Public License * | |||||
| * along with this program; if not, write to the Free Software * | |||||
| * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * | |||||
| * MA 02111-1307 USA * | |||||
| ***************************************************************************/ | |||||
| #ifndef __LS_ENGINEFACTORY_H__ | |||||
| #define __LS_ENGINEFACTORY_H__ | |||||
| #include <linuxsampler/engines/Engine.h> | |||||
| #include <set> | |||||
| #include <vector> | |||||
| namespace LinuxSampler { | |||||
| class EngineFactory { | |||||
| public: | |||||
| static std::vector<String> AvailableEngineTypes(); | |||||
| static String AvailableEngineTypesAsString(); | |||||
| static Engine* Create(String EngineType) throw (Exception); | |||||
| static void Destroy(Engine* pEngine); | |||||
| static const std::set<Engine*>& EngineInstances(); | |||||
| protected: | |||||
| static void Erase(Engine* pEngine); | |||||
| friend class Engine; | |||||
| }; | |||||
| } // namespace LinuxSampler | |||||
| #endif // __LS_ENGINEFACTORY_H__ | |||||
| @@ -18,7 +18,7 @@ | |||||
| #ifndef CARLA_JACKBRIDGE_H | #ifndef CARLA_JACKBRIDGE_H | ||||
| #define CARLA_JACKBRIDGE_H | #define CARLA_JACKBRIDGE_H | ||||
| #include "carla_defines.h" | |||||
| #include "carla_defines.hpp" | |||||
| #include <jack/jack.h> | #include <jack/jack.h> | ||||
| #include <jack/midiport.h> | #include <jack/midiport.h> | ||||
| @@ -1,4 +1,4 @@ | |||||
| /* simple file for rtmempool compatibility */ | |||||
| /* simple file for carla-rtmempool compatibility */ | |||||
| #define LOG_DEBUG(format, arg...) | #define LOG_DEBUG(format, arg...) | ||||
| #define LOG_WARNING(format, arg...) | #define LOG_WARNING(format, arg...) | ||||
| @@ -28,7 +28,6 @@ | |||||
| #include <stdlib.h> | #include <stdlib.h> | ||||
| #include <assert.h> | #include <assert.h> | ||||
| #include <pthread.h> | #include <pthread.h> | ||||
| #include "lv2/lv2_rtmempool.h" | |||||
| #include "rtmempool.h" | #include "rtmempool.h" | ||||
| @@ -24,6 +24,8 @@ | |||||
| #ifndef RTMEMPOOL_H__1FA54215_11CF_4659_9CF3_C17A10A67A1F__INCLUDED | #ifndef RTMEMPOOL_H__1FA54215_11CF_4659_9CF3_C17A10A67A1F__INCLUDED | ||||
| #define RTMEMPOOL_H__1FA54215_11CF_4659_9CF3_C17A10A67A1F__INCLUDED | #define RTMEMPOOL_H__1FA54215_11CF_4659_9CF3_C17A10A67A1F__INCLUDED | ||||
| #include "lv2/lv2_rtmempool.h" | |||||
| #ifdef __cplusplus | #ifdef __cplusplus | ||||
| extern "C" { | extern "C" { | ||||
| #endif | #endif | ||||
| @@ -15,13 +15,13 @@ | |||||
| * For a full copy of the GNU General Public License see the COPYING file | * For a full copy of the GNU General Public License see the COPYING file | ||||
| */ | */ | ||||
| #ifndef CARLA_LADSPA_UTILS_H | |||||
| #define CARLA_LADSPA_UTILS_H | |||||
| #ifndef CARLA_LADSPA_UTILS_HPP | |||||
| #define CARLA_LADSPA_UTILS_HPP | |||||
| #include "carla_utils.h" | |||||
| #include "carla_utils.hpp" | |||||
| #include "ladspa/ladspa.h" | #include "ladspa/ladspa.h" | ||||
| #include "ladspa_rdf.h" | |||||
| #include "ladspa_rdf.hpp" | |||||
| #include <cmath> | #include <cmath> | ||||
| #include <cstring> | #include <cstring> | ||||
| @@ -202,4 +202,4 @@ LADSPA_Data get_default_ladspa_port_value(const LADSPA_PortRangeHintDescriptor h | |||||
| // ------------------------------------------------------------------------------------------------ | // ------------------------------------------------------------------------------------------------ | ||||
| #endif // CARLA_LADSPA_UTILS_H | |||||
| #endif // CARLA_LADSPA_UTILS_HPP | |||||
| @@ -15,15 +15,17 @@ | |||||
| * For a full copy of the GNU General Public License see the COPYING file | * For a full copy of the GNU General Public License see the COPYING file | ||||
| */ | */ | ||||
| #ifndef CARLA_LIBRARY_UTILS_H | |||||
| #define CARLA_LIBRARY_UTILS_H | |||||
| #ifndef CARLA_LIBRARY_UTILS_HPP | |||||
| #define CARLA_LIBRARY_UTILS_HPP | |||||
| #include "carla_utils.h" | |||||
| #include "carla_utils.hpp" | |||||
| #ifndef Q_OS_WIN | #ifndef Q_OS_WIN | ||||
| # include <dlfcn.h> | # include <dlfcn.h> | ||||
| #endif | #endif | ||||
| // ------------------------------------------------------------------------------------------------ | |||||
| static inline | static inline | ||||
| void* lib_open(const char* const filename) | void* lib_open(const char* const filename) | ||||
| { | { | ||||
| @@ -90,4 +92,6 @@ const char* lib_error(const char* const filename) | |||||
| #endif | #endif | ||||
| } | } | ||||
| #endif // CARLA_LIBRARY_UTILS_H | |||||
| // ------------------------------------------------------------------------------------------------ | |||||
| #endif // CARLA_LIBRARY_UTILS_HPP | |||||
| @@ -1,5 +1,5 @@ | |||||
| /* | /* | ||||
| * Carla common LV2 code | |||||
| * Carla LV2 utils | |||||
| * Copyright (C) 2011-2012 Filipe Coelho <falktx@falktx.com> | * Copyright (C) 2011-2012 Filipe Coelho <falktx@falktx.com> | ||||
| * | * | ||||
| * This program is free software; you can redistribute it and/or modify | * This program is free software; you can redistribute it and/or modify | ||||
| @@ -15,8 +15,8 @@ | |||||
| * For a full copy of the GNU General Public License see the COPYING file | * For a full copy of the GNU General Public License see the COPYING file | ||||
| */ | */ | ||||
| #ifndef CARLA_LV2_INCLUDES_H | |||||
| #define CARLA_LV2_INCLUDES_H | |||||
| #ifndef CARLA_LV2_UTILS_H | |||||
| #define CARLA_LV2_UTILS_H | |||||
| // TODO - presets state | // TODO - presets state | ||||
| @@ -53,12 +53,12 @@ | |||||
| #include "lv2/lv2_programs.h" | #include "lv2/lv2_programs.h" | ||||
| #include "lv2/lv2_rtmempool.h" | #include "lv2/lv2_rtmempool.h" | ||||
| #include "lv2_rdf.h" | |||||
| #include "lv2_rdf.hpp" | |||||
| #include "lilv/lilvmm.hpp" | #include "lilv/lilvmm.hpp" | ||||
| #include "sratom/sratom.h" | #include "sratom/sratom.h" | ||||
| #include "carla_defines.h" | |||||
| #include "carla_defines.hpp" | |||||
| #include <QtCore/QMap> | #include <QtCore/QMap> | ||||
| #include <QtCore/QStringList> | #include <QtCore/QStringList> | ||||
| @@ -1169,4 +1169,4 @@ LV2_URI get_lv2_ui_uri(const LV2_Property type) | |||||
| } | } | ||||
| } | } | ||||
| #endif // CARLA_LV2_INCLUDES_H | |||||
| #endif // CARLA_LV2_UTILS_H | |||||
| @@ -15,15 +15,17 @@ | |||||
| * For a full copy of the GNU General Public License see the COPYING file | * For a full copy of the GNU General Public License see the COPYING file | ||||
| */ | */ | ||||
| #ifndef CARLA_OSC_UTILS_H | |||||
| #define CARLA_OSC_UTILS_H | |||||
| #ifndef CARLA_OSC_UTILS_HPP | |||||
| #define CARLA_OSC_UTILS_HPP | |||||
| #include "carla_utils.h" | |||||
| #include "carla_utils.hpp" | |||||
| #include <cstdint> | #include <cstdint> | ||||
| #include <lo/lo.h> | #include <lo/lo.h> | ||||
| // ------------------------------------------------------------------------------------------------ | |||||
| struct CarlaOscData { | struct CarlaOscData { | ||||
| const char* path; | const char* path; | ||||
| lo_address source; | lo_address source; | ||||
| @@ -51,6 +53,8 @@ struct CarlaOscData { | |||||
| } | } | ||||
| }; | }; | ||||
| // ------------------------------------------------------------------------------------------------ | |||||
| static inline | static inline | ||||
| void osc_send_configure(const CarlaOscData* const oscData, const char* const key, const char* const value) | void osc_send_configure(const CarlaOscData* const oscData, const char* const key, const char* const value) | ||||
| { | { | ||||
| @@ -261,6 +265,8 @@ void osc_send_quit(const CarlaOscData* const oscData) | |||||
| } | } | ||||
| #endif | #endif | ||||
| // ------------------------------------------------------------------------------------------------ | |||||
| #ifdef BUILD_BRIDGE_PLUGIN | #ifdef BUILD_BRIDGE_PLUGIN | ||||
| static inline | static inline | ||||
| void osc_send_bridge_update(const CarlaOscData* const oscData, const char* const url) | void osc_send_bridge_update(const CarlaOscData* const oscData, const char* const url) | ||||
| @@ -331,4 +337,6 @@ void osc_send_lv2_transfer_event(const CarlaOscData* const oscData, const int32_ | |||||
| } | } | ||||
| } | } | ||||
| #endif // CARLA_OSC_UTILS_H | |||||
| // ------------------------------------------------------------------------------------------------ | |||||
| #endif // CARLA_OSC_UTILS_HPP | |||||
| @@ -15,10 +15,10 @@ | |||||
| * For a full copy of the GNU General Public License see the COPYING file | * For a full copy of the GNU General Public License see the COPYING file | ||||
| */ | */ | ||||
| #ifndef CARLA_UTILS_H | |||||
| #define CARLA_UTILS_H | |||||
| #ifndef CARLA_UTILS_HPP | |||||
| #define CARLA_UTILS_HPP | |||||
| #include "carla_defines.h" | |||||
| #include "carla_defines.hpp" | |||||
| #include <cstdio> | #include <cstdio> | ||||
| #include <cstdlib> | #include <cstdlib> | ||||
| @@ -317,4 +317,4 @@ carla_string operator+(const char* const strBufBefore, const carla_string& strAf | |||||
| // ------------------------------------------------- | // ------------------------------------------------- | ||||
| #endif // CARLA_UTILS_H | |||||
| #endif // CARLA_UTILS_HPP | |||||
| @@ -23,7 +23,7 @@ | |||||
| #include <jack/transport.h> | #include <jack/transport.h> | ||||
| #ifdef HAVE_JACKSESSION | #ifdef HAVE_JACKSESSION | ||||
| #include <jack/session.h> | |||||
| # include <jack/session.h> | |||||
| #endif | #endif | ||||
| #include <cstring> | #include <cstring> | ||||
| @@ -79,7 +79,7 @@ std::string jack_status_get_error_string(const jack_status_t& status) | |||||
| if (status & JackClientZombie) | if (status & JackClientZombie) | ||||
| errorString += "Client is being shutdown against its will;\n"; | errorString += "Client is being shutdown against its will;\n"; | ||||
| if (errorString.size() > 0) | |||||
| if (errorString.size() > 2) | |||||
| errorString.replace(errorString.size()-2, 2, "."); | errorString.replace(errorString.size()-2, 2, "."); | ||||
| return errorString; | return errorString; | ||||