Browse Source

More of the same

tags/v0.9.0
falkTX 13 years ago
parent
commit
f5f37f00ba
27 changed files with 244 additions and 234 deletions
  1. +1
    -1
      c++/carla-backend/carla_backend.h
  2. +1
    -1
      c++/carla-backend/carla_osc.h
  3. +1
    -1
      c++/carla-backend/carla_plugin.h
  4. +1
    -1
      c++/carla-backend/dssi.cpp
  5. +1
    -1
      c++/carla-backend/ladspa.cpp
  6. +133
    -1
      c++/carla-backend/linuxsampler.cpp
  7. +2
    -2
      c++/carla-backend/lv2.cpp
  8. +1
    -1
      c++/carla-backend/plugins/carla_nativemm.h
  9. +11
    -11
      c++/carla-backend/qtcreator/carla-backend.pro
  10. +1
    -1
      c++/carla-backend/vst.cpp
  11. +4
    -5
      c++/carla-includes/carla_defines.hpp
  12. +0
    -180
      c++/carla-includes/carla_linuxsampler_utils.h
  13. +0
    -0
      c++/carla-includes/ladspa_rdf.hpp
  14. +46
    -0
      c++/carla-includes/linuxsampler/EngineFactory.h
  15. +0
    -0
      c++/carla-includes/lv2_atom_queue.hpp
  16. +0
    -0
      c++/carla-includes/lv2_rdf.hpp
  17. +1
    -1
      c++/carla-jackbridge/carla_jackbridge.h
  18. +1
    -1
      c++/carla-rtmempool/log.h
  19. +0
    -1
      c++/carla-rtmempool/rtmempool.c
  20. +2
    -0
      c++/carla-rtmempool/rtmempool.h
  21. +5
    -5
      c++/carla-utils/carla_ladspa_utils.hpp
  22. +8
    -4
      c++/carla-utils/carla_lib_utils.hpp
  23. +6
    -6
      c++/carla-utils/carla_lv2_utils.hpp
  24. +12
    -4
      c++/carla-utils/carla_osc_utils.hpp
  25. +4
    -4
      c++/carla-utils/carla_utils.hpp
  26. +0
    -0
      c++/carla-utils/carla_vst_utils.hpp
  27. +2
    -2
      c++/jack_utils.h

+ 1
- 1
c++/carla-backend/carla_backend.h View File

@@ -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 }


+ 1
- 1
c++/carla-backend/carla_osc.h View File

@@ -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


+ 1
- 1
c++/carla-backend/carla_plugin.h View File

@@ -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"


+ 1
- 1
c++/carla-backend/dssi.cpp View File

@@ -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


+ 1
- 1
c++/carla-backend/ladspa.cpp View File

@@ -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




+ 133
- 1
c++/carla-backend/linuxsampler.cpp View File

@@ -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>




+ 2
- 2
c++/carla-backend/lv2.cpp View File

@@ -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>


+ 1
- 1
c++/carla-backend/plugins/carla_nativemm.h View File

@@ -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:


+ 11
- 11
c++/carla-backend/qtcreator/carla-backend.pro View File

@@ -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 \


+ 1
- 1
c++/carla-backend/vst.cpp View File

@@ -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>


c++/carla-includes/carla_defines.h → c++/carla-includes/carla_defines.hpp View File

@@ -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

+ 0
- 180
c++/carla-includes/carla_linuxsampler_utils.h View File

@@ -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

c++/carla-includes/ladspa_rdf.h → c++/carla-includes/ladspa_rdf.hpp View File


+ 46
- 0
c++/carla-includes/linuxsampler/EngineFactory.h View File

@@ -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__

c++/carla-includes/lv2_atom_queue.h → c++/carla-includes/lv2_atom_queue.hpp View File


c++/carla-includes/lv2_rdf.h → c++/carla-includes/lv2_rdf.hpp View File


+ 1
- 1
c++/carla-jackbridge/carla_jackbridge.h View File

@@ -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
- 1
c++/carla-rtmempool/log.h View File

@@ -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...)

+ 0
- 1
c++/carla-rtmempool/rtmempool.c View File

@@ -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"




+ 2
- 0
c++/carla-rtmempool/rtmempool.h View File

@@ -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


c++/carla-includes/carla_ladspa_utils.h → c++/carla-utils/carla_ladspa_utils.hpp View File

@@ -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

c++/carla-includes/carla_lib_utils.h → c++/carla-utils/carla_lib_utils.hpp View File

@@ -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

c++/carla-includes/carla_lv2.h → c++/carla-utils/carla_lv2_utils.hpp View File

@@ -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

c++/carla-includes/carla_osc_utils.h → c++/carla-utils/carla_osc_utils.hpp View File

@@ -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

c++/carla-includes/carla_utils.h → c++/carla-utils/carla_utils.hpp View File

@@ -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

c++/carla-includes/carla_vst_utils.h → c++/carla-utils/carla_vst_utils.hpp View File


+ 2
- 2
c++/jack_utils.h View File

@@ -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;


Loading…
Cancel
Save