Browse Source

Move some definitions around

Signed-off-by: falkTX <falktx@falktx.com>
tags/v2.1-rc1
falkTX 4 years ago
parent
commit
a02c1f975b
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
2 changed files with 26 additions and 25 deletions
  1. +1
    -25
      source/utils/CarlaBridgeDefines.hpp
  2. +25
    -0
      source/utils/CarlaBridgeUtils.hpp

+ 1
- 25
source/utils/CarlaBridgeDefines.hpp View File

@@ -18,7 +18,7 @@
#ifndef CARLA_BRIDGE_DEFINES_HPP_INCLUDED
#define CARLA_BRIDGE_DEFINES_HPP_INCLUDED

#include "CarlaRingBuffer.hpp"
#include "CarlaDefines.h"

// how much backwards compatible we are
#define CARLA_PLUGIN_BRIDGE_API_VERSION_MINIMUM 6
@@ -158,28 +158,4 @@ struct BridgeTimeInfo {

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

static const std::size_t kBridgeRtClientDataMidiOutSize = 511*4;
static const std::size_t kBridgeBaseMidiOutHeaderSize = 6U /* time, port and size */;

// Server => Client RT
struct BridgeRtClientData {
BridgeSemaphore sem;
BridgeTimeInfo timeInfo;
SmallStackBuffer ringBuffer;
uint8_t midiOut[kBridgeRtClientDataMidiOutSize];
uint32_t procFlags;
};

// Server => Client Non-RT
struct BridgeNonRtClientData {
BigStackBuffer ringBuffer;
};

// Client => Server Non-RT
struct BridgeNonRtServerData {
HugeStackBuffer ringBuffer;
};

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

#endif // CARLA_BRIDGE_DEFINES_HPP_INCLUDED

+ 25
- 0
source/utils/CarlaBridgeUtils.hpp View File

@@ -20,6 +20,7 @@

#include "CarlaBridgeDefines.hpp"
#include "CarlaMutex.hpp"
#include "CarlaRingBuffer.hpp"
#include "CarlaString.hpp"

// -------------------------------------------------------------------------------------------------------------------
@@ -203,6 +204,30 @@ const char* PluginBridgeNonRtServerOpcode2str(const PluginBridgeNonRtServerOpcod

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

static const std::size_t kBridgeRtClientDataMidiOutSize = 511*4;
static const std::size_t kBridgeBaseMidiOutHeaderSize = 6U /* time, port and size */;

// Server => Client RT
struct BridgeRtClientData {
BridgeSemaphore sem;
BridgeTimeInfo timeInfo;
SmallStackBuffer ringBuffer;
uint8_t midiOut[kBridgeRtClientDataMidiOutSize];
uint32_t procFlags;
};

// Server => Client Non-RT
struct BridgeNonRtClientData {
BigStackBuffer ringBuffer;
};

// Client => Server Non-RT
struct BridgeNonRtServerData {
HugeStackBuffer ringBuffer;
};

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

struct BridgeAudioPool {
float* data;
std::size_t dataSize;


Loading…
Cancel
Save