Browse Source

Start some bridge structs rework

tags/1.9.4
falkTX 11 years ago
parent
commit
68f08df789
2 changed files with 26 additions and 11 deletions
  1. +19
    -11
      source/utils/CarlaBridgeUtils.hpp
  2. +7
    -0
      source/utils/CarlaRingBuffer.hpp

+ 19
- 11
source/utils/CarlaBridgeUtils.hpp View File

@@ -75,6 +75,17 @@ const char* const CARLA_BRIDGE_MSG_SAVED = "CarlaBridgeSaved"; //!< Plugi

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

struct BridgeSemaphore {
union {
void* server;
char _padServer[32];
};
union {
void* client;
char _padClient[32];
};
};

struct BridgeTimeInfo {
bool playing;
uint64_t frame;
@@ -86,18 +97,15 @@ struct BridgeTimeInfo {
double barStartTick, ticksPerBeat, beatsPerMinute;
};

// -----------------------------------------------------------------------
struct BridgeShmRtData {
BridgeSemaphore sem;
BridgeTimeInfo timeInfo;
StackBuffer ringBuffer;
};

struct BridgeShmControl {
union {
void* runServer;
char _padServer[64];
};
union {
void* runClient;
char _padClient[64];
};
StackBuffer buffer;
struct BridgeShmNonRtData {
BridgeSemaphore sem;
BigStackBuffer ringBuffer;
};

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


+ 7
- 0
source/utils/CarlaRingBuffer.hpp View File

@@ -68,6 +68,13 @@ struct StackBuffer {
uint8_t buf[size];
};

struct BigStackBuffer {
static const uint32_t size = 16384;
uint32_t head, tail, wrtn;
bool invalidateCommit;
uint8_t buf[size];
};

// -----------------------------------------------------------------------
// CarlaRingBuffer templated class



Loading…
Cancel
Save