Browse Source

Misc cleanup

tags/1.9.4
falkTX 10 years ago
parent
commit
8738b6ecd1
7 changed files with 19 additions and 31 deletions
  1. +3
    -3
      source/backend/CarlaBackend.h
  2. +2
    -8
      source/backend/CarlaEngine.hpp
  3. +2
    -8
      source/backend/CarlaPlugin.hpp
  4. +4
    -4
      source/backend/plugin/CarlaPluginThread.cpp
  5. +3
    -3
      source/backend/plugin/CarlaPluginThread.hpp
  6. +1
    -1
      source/backend/plugin/CarlaPluginUi.cpp
  7. +4
    -4
      source/includes/CarlaDefines.h

+ 3
- 3
source/backend/CarlaBackend.h View File

@@ -870,12 +870,12 @@ typedef enum {
* @param value1 Port Id * @param value1 Port Id
* @param value3 New port value * @param value3 New port value
*/ */
ENGINE_CALLBACK_PATCHBAY_PORT_VALUE_CHANGED = 26,
ENGINE_CALLBACK_PATCHBAY_PORT_VALUE_CHANGED = 26, // TODO


/*! /*!
* A patchbay connection has been added. * A patchbay connection has been added.
* @param pluginId Connection Id * @param pluginId Connection Id
* @param valueStr Out group, port plus in group and port, in "og:op:ig:ip" syntax.
* @param valueStr Out group and port plus in group and port, in "og:op:ig:ip" syntax.
*/ */
ENGINE_CALLBACK_PATCHBAY_CONNECTION_ADDED = 27, ENGINE_CALLBACK_PATCHBAY_CONNECTION_ADDED = 27,


@@ -1252,7 +1252,7 @@ typedef struct {
/*! /*!
* Currently mapped MIDI CC.\n * Currently mapped MIDI CC.\n
* A value lower than 0 means invalid or unused.\n * A value lower than 0 means invalid or unused.\n
* Maximum allowed value is 95 (0x5F).
* Maximum allowed value is 95 (0x5F). - FIXME
*/ */
int16_t midiCC; int16_t midiCC;




+ 2
- 8
source/backend/CarlaEngine.hpp View File

@@ -618,12 +618,6 @@ protected:


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


/*!
* Protected data used in CarlaEngine and subclasses.\n
* Non-engine code MUST NEVER have direct access to this.
*/
struct CarlaEngineProtectedData;

/*! /*!
* Carla Engine. * Carla Engine.
* \note This is a virtual class for all available engine types available in Carla. * \note This is a virtual class for all available engine types available in Carla.
@@ -1040,8 +1034,8 @@ protected:
/*! /*!
* Internal data, for CarlaEngine subclasses only. * Internal data, for CarlaEngine subclasses only.
*/ */
CarlaEngineProtectedData* const pData;
friend struct CarlaEngineProtectedData;
struct ProtectedData;
ProtectedData* const pData;


// ------------------------------------------------------------------- // -------------------------------------------------------------------
// Internal stuff // Internal stuff


+ 2
- 8
source/backend/CarlaPlugin.hpp View File

@@ -51,12 +51,6 @@ class CarlaEngineAudioPort;
*/ */
struct SaveState; struct SaveState;


/*!
* Protected data used in CarlaPlugin and subclasses.\n
* Non-plugin code MUST NEVER have direct access to this.
*/
struct CarlaPluginProtectedData;

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


/*! /*!
@@ -884,8 +878,8 @@ protected:
/*! /*!
* Internal data, for CarlaPlugin subclasses only. * Internal data, for CarlaPlugin subclasses only.
*/ */
CarlaPluginProtectedData* const pData;
friend struct CarlaPluginProtectedData;
struct ProtectedData;
ProtectedData* const pData;


// ------------------------------------------------------------------- // -------------------------------------------------------------------
// Helper classes // Helper classes


+ 4
- 4
source/backend/plugin/CarlaPluginThread.cpp View File

@@ -26,7 +26,7 @@ CARLA_BACKEND_START_NAMESPACE


#ifdef DEBUG #ifdef DEBUG
static inline static inline
const char* PluginThreadMode2str(const CarlaPluginThread::Mode mode)
const char* PluginThreadMode2str(const CarlaPluginThread::Mode mode) noexcept
{ {
switch (mode) switch (mode)
{ {
@@ -47,7 +47,7 @@ const char* PluginThreadMode2str(const CarlaPluginThread::Mode mode)
} }
#endif #endif


CarlaPluginThread::CarlaPluginThread(CarlaBackend::CarlaEngine* const engine, CarlaBackend::CarlaPlugin* const plugin, const Mode mode)
CarlaPluginThread::CarlaPluginThread(CarlaBackend::CarlaEngine* const engine, CarlaBackend::CarlaPlugin* const plugin, const Mode mode) noexcept
: CarlaThread("CarlaPluginThread"), : CarlaThread("CarlaPluginThread"),
fEngine(engine), fEngine(engine),
fPlugin(plugin), fPlugin(plugin),
@@ -68,7 +68,7 @@ CarlaPluginThread::~CarlaPluginThread()
} }
} }


void CarlaPluginThread::setMode(const CarlaPluginThread::Mode mode)
void CarlaPluginThread::setMode(const CarlaPluginThread::Mode mode) noexcept
{ {
CARLA_SAFE_ASSERT(! isThreadRunning()); CARLA_SAFE_ASSERT(! isThreadRunning());
carla_debug("CarlaPluginThread::setMode(%s)", PluginThreadMode2str(mode)); carla_debug("CarlaPluginThread::setMode(%s)", PluginThreadMode2str(mode));
@@ -76,7 +76,7 @@ void CarlaPluginThread::setMode(const CarlaPluginThread::Mode mode)
fMode = mode; fMode = mode;
} }


void CarlaPluginThread::setOscData(const char* const binary, const char* const label, const char* const extra1, const char* const extra2)
void CarlaPluginThread::setOscData(const char* const binary, const char* const label, const char* const extra1, const char* const extra2) noexcept
{ {
CARLA_SAFE_ASSERT(! isThreadRunning()); CARLA_SAFE_ASSERT(! isThreadRunning());
carla_debug("CarlaPluginThread::setOscData(\"%s\", \"%s\", \"%s\", \"%s\")", binary, label, extra1, extra2); carla_debug("CarlaPluginThread::setOscData(\"%s\", \"%s\", \"%s\", \"%s\")", binary, label, extra1, extra2);


+ 3
- 3
source/backend/plugin/CarlaPluginThread.hpp View File

@@ -42,11 +42,11 @@ public:
PLUGIN_THREAD_BRIDGE PLUGIN_THREAD_BRIDGE
}; };


CarlaPluginThread(CarlaEngine* const engine, CarlaPlugin* const plugin, const Mode mode = PLUGIN_THREAD_NULL);
CarlaPluginThread(CarlaEngine* const engine, CarlaPlugin* const plugin, const Mode mode = PLUGIN_THREAD_NULL) noexcept;
~CarlaPluginThread() override; ~CarlaPluginThread() override;


void setMode(const CarlaPluginThread::Mode mode);
void setOscData(const char* const binary, const char* const label, const char* const extra1="", const char* const extra2="");
void setMode(const CarlaPluginThread::Mode mode) noexcept;
void setOscData(const char* const binary, const char* const label, const char* const extra1="", const char* const extra2="") noexcept;


uintptr_t getPid() const; uintptr_t getPid() const;




+ 1
- 1
source/backend/plugin/CarlaPluginUi.cpp View File

@@ -256,7 +256,7 @@ bool CarlaPluginUi::tryTransientWinIdMatch(const uintptr_t pid, const char* cons


if (*(ulong*)pidData == static_cast<ulong>(pid)) if (*(ulong*)pidData == static_cast<ulong>(pid))
{ {
CARLA_SAFE_ASSERT_RETURN(lastGoodWindow == window || lastGoodWindow == 0, true);
CARLA_SAFE_ASSERT_RETURN(lastGoodWindow == window || lastGoodWindow == 0, true);
lastGoodWindow = window; lastGoodWindow = window;
carla_stdout("Match found using pid"); carla_stdout("Match found using pid");
break; break;


+ 4
- 4
source/includes/CarlaDefines.h View File

@@ -15,8 +15,8 @@
* For a full copy of the GNU General Public License see the doc/GPL.txt file. * For a full copy of the GNU General Public License see the doc/GPL.txt file.
*/ */


#ifndef CARLA_DEFINES_HPP_INCLUDED
#define CARLA_DEFINES_HPP_INCLUDED
#ifndef CARLA_DEFINES_H_INCLUDED
#define CARLA_DEFINES_H_INCLUDED


/* IDE Helper */ /* IDE Helper */
#ifndef REAL_BUILD #ifndef REAL_BUILD
@@ -121,7 +121,7 @@
# define BINARY_NATIVE BINARY_WIN32 # define BINARY_NATIVE BINARY_WIN32
# endif # endif
#else #else
# warning Unknown binary native
# warning Unknown native binary type
# define BINARY_NATIVE BINARY_OTHER # define BINARY_NATIVE BINARY_OTHER
#endif #endif


@@ -232,4 +232,4 @@ typedef unsigned long int ulong;
typedef unsigned short int ushort; typedef unsigned short int ushort;
typedef unsigned int uint; typedef unsigned int uint;


#endif /* CARLA_DEFINES_HPP_INCLUDED */
#endif /* CARLA_DEFINES_H_INCLUDED */

Loading…
Cancel
Save