Files
es5-clap/src/es5_shared.h
T
sub 4d0ad127b5 Add shared memory daemon architecture and systemd service
Move ES-5 encoding from the CLAP plugin to a standalone PipeWire
daemon (es5d) communicating via POSIX shared memory. The plugin now
acts as a parameter/state frontend while es5d outputs directly to
the ES-9. Includes systemd user service for autostart after reboot
and an install script for local deployment.
2026-03-27 22:01:04 +01:00

24 lines
623 B
C++
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// Shared memory layout between CLAP plugin and ES-5 daemon
// Copyright (c) 2026 Sub-Net e.U. — MIT License
#pragma once
#include <cstdint>
#include <atomic>
#define ES5_SHM_NAME "/es5_state"
#define ES5_NUM_HEADERS 6
#define ES5_CHANNELS_PER_HEADER 8
struct ES5SharedState {
// Header types: 0=off, 1=GT, 2=CV
std::atomic<uint8_t> header_types[ES5_NUM_HEADERS];
// Gate/CV values per header per channel
// GT: >0.5 = on, CV: 0.01.0 maps to full DAC range
std::atomic<float> values[ES5_NUM_HEADERS][ES5_CHANNELS_PER_HEADER];
// Flag: plugin is active
std::atomic<uint8_t> active;
};