diff --git a/c++/carla-backend/carla_backend.h b/c++/carla-backend/carla_backend.h index 4056a10..70c69ff 100644 --- a/c++/carla-backend/carla_backend.h +++ b/c++/carla-backend/carla_backend.h @@ -20,7 +20,7 @@ #include -#include "carla_defines.h" +#include "carla_defines.hpp" #define CARLA_BACKEND_START_NAMESPACE namespace CarlaBackend { #define CARLA_BACKEND_END_NAMESPACE } diff --git a/c++/carla-backend/carla_osc.h b/c++/carla-backend/carla_osc.h index a4e01cc..208df9a 100644 --- a/c++/carla-backend/carla_osc.h +++ b/c++/carla-backend/carla_osc.h @@ -19,7 +19,7 @@ #define CARLA_OSC_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_ARGS2 CARLA_OSC_HANDLE_ARGS1, const int argc, const lo_arg* const* const argv, const char* const types diff --git a/c++/carla-backend/carla_plugin.h b/c++/carla-backend/carla_plugin.h index ab6e463..c098c95 100644 --- a/c++/carla-backend/carla_plugin.h +++ b/c++/carla-backend/carla_plugin.h @@ -22,7 +22,7 @@ #include "carla_midi.h" #include "carla_shared.h" -#include "carla_lib_utils.h" +#include "carla_lib_utils.hpp" #ifdef BUILD_BRIDGE # include "carla_bridge_osc.h" diff --git a/c++/carla-backend/dssi.cpp b/c++/carla-backend/dssi.cpp index bdf7910..7efbd7a 100644 --- a/c++/carla-backend/dssi.cpp +++ b/c++/carla-backend/dssi.cpp @@ -19,7 +19,7 @@ #ifdef WANT_DSSI -#include "carla_ladspa_utils.h" +#include "carla_ladspa_utils.hpp" #include "dssi/dssi.h" CARLA_BACKEND_START_NAMESPACE diff --git a/c++/carla-backend/ladspa.cpp b/c++/carla-backend/ladspa.cpp index c694b84..9e0c5ae 100644 --- a/c++/carla-backend/ladspa.cpp +++ b/c++/carla-backend/ladspa.cpp @@ -19,7 +19,7 @@ #ifdef WANT_LADSPA -#include "carla_ladspa_utils.h" +#include "carla_ladspa_utils.hpp" CARLA_BACKEND_START_NAMESPACE diff --git a/c++/carla-backend/linuxsampler.cpp b/c++/carla-backend/linuxsampler.cpp index 6dfe54f..b69598d 100644 --- a/c++/carla-backend/linuxsampler.cpp +++ b/c++/carla-backend/linuxsampler.cpp @@ -25,7 +25,139 @@ #ifdef WANT_LINUXSAMPLER -#include "carla_linuxsampler_utils.h" +#include "linuxsampler/EngineFactory.h" +#include + +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()), + 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(), 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 diff --git a/c++/carla-backend/lv2.cpp b/c++/carla-backend/lv2.cpp index 5611a2c..17b002f 100644 --- a/c++/carla-backend/lv2.cpp +++ b/c++/carla-backend/lv2.cpp @@ -19,9 +19,9 @@ #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 diff --git a/c++/carla-backend/plugins/carla_nativemm.h b/c++/carla-backend/plugins/carla_nativemm.h index c063e3c..dc051b2 100644 --- a/c++/carla-backend/plugins/carla_nativemm.h +++ b/c++/carla-backend/plugins/carla_nativemm.h @@ -19,7 +19,7 @@ #define CARLA_NATIVE_MM_H #include "carla_native.h" -#include "carla_utils.h" +#include "carla_utils.hpp" class PluginDescriptorClass { public: diff --git a/c++/carla-backend/qtcreator/carla-backend.pro b/c++/carla-backend/qtcreator/carla-backend.pro index 41ccadb..ba99e47 100644 --- a/c++/carla-backend/qtcreator/carla-backend.pro +++ b/c++/carla-backend/qtcreator/carla-backend.pro @@ -48,22 +48,22 @@ HEADERS = \ ../carla_threads.h \ ../plugins/carla_native.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_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 = .. \ ../../carla-jackbridge \ ../../carla-includes \ + ../../carla-utils \ ../distrho-plugin-toolkit LIBS = -ldl \ diff --git a/c++/carla-backend/vst.cpp b/c++/carla-backend/vst.cpp index eb3c053..3a39a58 100644 --- a/c++/carla-backend/vst.cpp +++ b/c++/carla-backend/vst.cpp @@ -19,7 +19,7 @@ #ifdef WANT_VST -#include "carla_vst_utils.h" +#include "carla_vst_utils.hpp" #ifdef Q_WS_X11 # include diff --git a/c++/carla-includes/carla_defines.h b/c++/carla-includes/carla_defines.hpp similarity index 93% rename from c++/carla-includes/carla_defines.h rename to c++/carla-includes/carla_defines.hpp index 20a2528..0a46378 100644 --- a/c++/carla-includes/carla_defines.h +++ b/c++/carla-includes/carla_defines.hpp @@ -15,8 +15,8 @@ * 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__ # define Q_CORE_EXPORT @@ -26,7 +26,7 @@ #include -// TESTING - remove later (QtCreator doesn't fully support this) +// TESTING - remove later (QtCreator doesn't fully support this yet) #ifdef QTCREATOR_TEST # undef Q_COMPILER_INITIALIZER_LISTS #endif @@ -39,7 +39,6 @@ // Common includes and macros #ifdef Q_OS_WIN # include -//# define uintptr_t size_t // FIXME #else # include # ifndef __cdecl @@ -103,4 +102,4 @@ # endif #endif -#endif // CARLA_DEFINES_H +#endif // CARLA_DEFINES_HPP diff --git a/c++/carla-includes/carla_linuxsampler_utils.h b/c++/carla-includes/carla_linuxsampler_utils.h deleted file mode 100644 index 77cc7e8..0000000 --- a/c++/carla-includes/carla_linuxsampler_utils.h +++ /dev/null @@ -1,180 +0,0 @@ -/* - * Carla LinuxSampler utils - * Copyright (C) 2012 Filipe Coelho - * - * 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 -#include - -#include -#include - -namespace LinuxSampler { - -// ----------------------------------------------------------------------- - -class EngineFactory -{ -public: - static std::vector AvailableEngineTypes(); - static String AvailableEngineTypesAsString(); - static Engine* Create(String EngineType) throw (Exception); - static void Destroy(Engine* pEngine); - static const std::set& 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()), - 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(), 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 diff --git a/c++/carla-includes/ladspa_rdf.h b/c++/carla-includes/ladspa_rdf.hpp similarity index 100% rename from c++/carla-includes/ladspa_rdf.h rename to c++/carla-includes/ladspa_rdf.hpp diff --git a/c++/carla-includes/linuxsampler/EngineFactory.h b/c++/carla-includes/linuxsampler/EngineFactory.h new file mode 100644 index 0000000..8e01470 --- /dev/null +++ b/c++/carla-includes/linuxsampler/EngineFactory.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 + +#include +#include + +namespace LinuxSampler { + +class EngineFactory { +public: + static std::vector AvailableEngineTypes(); + static String AvailableEngineTypesAsString(); + static Engine* Create(String EngineType) throw (Exception); + static void Destroy(Engine* pEngine); + static const std::set& EngineInstances(); + +protected: + static void Erase(Engine* pEngine); + friend class Engine; +}; + +} // namespace LinuxSampler + +#endif // __LS_ENGINEFACTORY_H__ diff --git a/c++/carla-includes/lv2_atom_queue.h b/c++/carla-includes/lv2_atom_queue.hpp similarity index 100% rename from c++/carla-includes/lv2_atom_queue.h rename to c++/carla-includes/lv2_atom_queue.hpp diff --git a/c++/carla-includes/lv2_rdf.h b/c++/carla-includes/lv2_rdf.hpp similarity index 100% rename from c++/carla-includes/lv2_rdf.h rename to c++/carla-includes/lv2_rdf.hpp diff --git a/c++/carla-jackbridge/carla_jackbridge.h b/c++/carla-jackbridge/carla_jackbridge.h index 9419a3b..0c5ab1d 100644 --- a/c++/carla-jackbridge/carla_jackbridge.h +++ b/c++/carla-jackbridge/carla_jackbridge.h @@ -18,7 +18,7 @@ #ifndef CARLA_JACKBRIDGE_H #define CARLA_JACKBRIDGE_H -#include "carla_defines.h" +#include "carla_defines.hpp" #include #include diff --git a/c++/carla-rtmempool/log.h b/c++/carla-rtmempool/log.h index 07cba1d..2fb03e8 100644 --- a/c++/carla-rtmempool/log.h +++ b/c++/carla-rtmempool/log.h @@ -1,4 +1,4 @@ -/* simple file for rtmempool compatibility */ +/* simple file for carla-rtmempool compatibility */ #define LOG_DEBUG(format, arg...) #define LOG_WARNING(format, arg...) diff --git a/c++/carla-rtmempool/rtmempool.c b/c++/carla-rtmempool/rtmempool.c index 9e9d1eb..80e635a 100644 --- a/c++/carla-rtmempool/rtmempool.c +++ b/c++/carla-rtmempool/rtmempool.c @@ -28,7 +28,6 @@ #include #include #include -#include "lv2/lv2_rtmempool.h" #include "rtmempool.h" diff --git a/c++/carla-rtmempool/rtmempool.h b/c++/carla-rtmempool/rtmempool.h index 336d8fb..613d71a 100644 --- a/c++/carla-rtmempool/rtmempool.h +++ b/c++/carla-rtmempool/rtmempool.h @@ -24,6 +24,8 @@ #ifndef RTMEMPOOL_H__1FA54215_11CF_4659_9CF3_C17A10A67A1F__INCLUDED #define RTMEMPOOL_H__1FA54215_11CF_4659_9CF3_C17A10A67A1F__INCLUDED +#include "lv2/lv2_rtmempool.h" + #ifdef __cplusplus extern "C" { #endif diff --git a/c++/carla-includes/carla_ladspa_utils.h b/c++/carla-utils/carla_ladspa_utils.hpp similarity index 97% rename from c++/carla-includes/carla_ladspa_utils.h rename to c++/carla-utils/carla_ladspa_utils.hpp index 2057f61..f01ee96 100644 --- a/c++/carla-includes/carla_ladspa_utils.h +++ b/c++/carla-utils/carla_ladspa_utils.hpp @@ -15,13 +15,13 @@ * 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_rdf.h" +#include "ladspa_rdf.hpp" #include #include @@ -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 diff --git a/c++/carla-includes/carla_lib_utils.h b/c++/carla-utils/carla_lib_utils.hpp similarity index 86% rename from c++/carla-includes/carla_lib_utils.h rename to c++/carla-utils/carla_lib_utils.hpp index 9043374..e877055 100644 --- a/c++/carla-includes/carla_lib_utils.h +++ b/c++/carla-utils/carla_lib_utils.hpp @@ -15,15 +15,17 @@ * 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 # include #endif +// ------------------------------------------------------------------------------------------------ + static inline void* lib_open(const char* const filename) { @@ -90,4 +92,6 @@ const char* lib_error(const char* const filename) #endif } -#endif // CARLA_LIBRARY_UTILS_H +// ------------------------------------------------------------------------------------------------ + +#endif // CARLA_LIBRARY_UTILS_HPP diff --git a/c++/carla-includes/carla_lv2.h b/c++/carla-utils/carla_lv2_utils.hpp similarity index 99% rename from c++/carla-includes/carla_lv2.h rename to c++/carla-utils/carla_lv2_utils.hpp index e33c202..ff96729 100644 --- a/c++/carla-includes/carla_lv2.h +++ b/c++/carla-utils/carla_lv2_utils.hpp @@ -1,5 +1,5 @@ /* - * Carla common LV2 code + * Carla LV2 utils * Copyright (C) 2011-2012 Filipe Coelho * * 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 */ -#ifndef CARLA_LV2_INCLUDES_H -#define CARLA_LV2_INCLUDES_H +#ifndef CARLA_LV2_UTILS_H +#define CARLA_LV2_UTILS_H // TODO - presets state @@ -53,12 +53,12 @@ #include "lv2/lv2_programs.h" #include "lv2/lv2_rtmempool.h" -#include "lv2_rdf.h" +#include "lv2_rdf.hpp" #include "lilv/lilvmm.hpp" #include "sratom/sratom.h" -#include "carla_defines.h" +#include "carla_defines.hpp" #include #include @@ -1169,4 +1169,4 @@ LV2_URI get_lv2_ui_uri(const LV2_Property type) } } -#endif // CARLA_LV2_INCLUDES_H +#endif // CARLA_LV2_UTILS_H diff --git a/c++/carla-includes/carla_osc_utils.h b/c++/carla-utils/carla_osc_utils.hpp similarity index 95% rename from c++/carla-includes/carla_osc_utils.h rename to c++/carla-utils/carla_osc_utils.hpp index b4c6895..d0273c7 100644 --- a/c++/carla-includes/carla_osc_utils.h +++ b/c++/carla-utils/carla_osc_utils.hpp @@ -15,15 +15,17 @@ * 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 #include +// ------------------------------------------------------------------------------------------------ + struct CarlaOscData { const char* path; lo_address source; @@ -51,6 +53,8 @@ struct CarlaOscData { } }; +// ------------------------------------------------------------------------------------------------ + static inline 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 +// ------------------------------------------------------------------------------------------------ + #ifdef BUILD_BRIDGE_PLUGIN static inline 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 diff --git a/c++/carla-includes/carla_utils.h b/c++/carla-utils/carla_utils.hpp similarity index 98% rename from c++/carla-includes/carla_utils.h rename to c++/carla-utils/carla_utils.hpp index ebbecea..7f43450 100644 --- a/c++/carla-includes/carla_utils.h +++ b/c++/carla-utils/carla_utils.hpp @@ -15,10 +15,10 @@ * 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 #include @@ -317,4 +317,4 @@ carla_string operator+(const char* const strBufBefore, const carla_string& strAf // ------------------------------------------------- -#endif // CARLA_UTILS_H +#endif // CARLA_UTILS_HPP diff --git a/c++/carla-includes/carla_vst_utils.h b/c++/carla-utils/carla_vst_utils.hpp similarity index 100% rename from c++/carla-includes/carla_vst_utils.h rename to c++/carla-utils/carla_vst_utils.hpp diff --git a/c++/jack_utils.h b/c++/jack_utils.h index 0509edb..d147435 100644 --- a/c++/jack_utils.h +++ b/c++/jack_utils.h @@ -23,7 +23,7 @@ #include #ifdef HAVE_JACKSESSION - #include +# include #endif #include @@ -79,7 +79,7 @@ std::string jack_status_get_error_string(const jack_status_t& status) if (status & JackClientZombie) errorString += "Client is being shutdown against its will;\n"; - if (errorString.size() > 0) + if (errorString.size() > 2) errorString.replace(errorString.size()-2, 2, "."); return errorString;