Skip to content

Commit

Permalink
Release 1.0.23
Browse files Browse the repository at this point in the history
* Added support of sidechain passed by shared memory link.
* Updated build scripts and dependencies.
  • Loading branch information
sadko4u committed Oct 8, 2024
2 parents 4421982 + a17b9fe commit 7d843fc
Show file tree
Hide file tree
Showing 34 changed files with 1,272 additions and 1,030 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
* RECENT CHANGES
*******************************************************************************

=== 1.0.23 ===
* Added support of sidechain passed by shared memory link.
* Updated build scripts and dependencies.

=== 1.0.22 ===
* Fixed improper phase compensation between Dry and Wet channels in
Linear Phase mode.
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,13 @@ help:
echo "Available FEATURES:"
echo " clap CLAP plugin format binaries"
echo " doc Generate standalone HTML documentation"
echo " gst GStreamer plugins"
echo " jack Standalone JACK plugins"
echo " ladspa LADSPA plugins"
echo " lv2 LV2 plugins"
echo " ui Build plugins with UI"
echo " vst2 VST 2.x plugin binaries"
echo " vst3 VST 3.x plugin binaries"
echo " xdg Desktop integration icons"


33 changes: 25 additions & 8 deletions include/private/plugins/mb_compressor.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@ namespace lsp
XOVER_LINEAR_PHASE // Linear phase mode
};

enum sc_type_t
{
SCT_INTERNAL,
SCT_EXTERNAL,
SCT_LINK,
};

protected:
enum sync_t
{
Expand Down Expand Up @@ -96,18 +103,18 @@ namespace lsp
float fFreqLCF; // Cutoff frequency for high-pass filter
float fMakeup; // Makeup gain
float fGainLevel; // Gain adjustment level
size_t nLookahead; // Lookahead amount
uint32_t nLookahead; // Lookahead amount

bool bEnabled; // Enabled flag
bool bCustHCF; // Custom frequency for high-cut filter
bool bCustLCF; // Custom frequency for low-cut filter
bool bMute; // Mute channel
bool bSolo; // Solo channel
bool bExtSc; // External sidechain
size_t nSync; // Synchronize output data flags
size_t nFilterID; // Identifier of the filter
uint32_t nScType; // Sidechain type
uint32_t nSync; // Synchronize output data flags
uint32_t nFilterID; // Identifier of the filter

plug::IPort *pExtSc; // External sidechain
plug::IPort *pScType; // Sidechain type
plug::IPort *pScSource; // Sidechain source
plug::IPort *pScSpSource; // Sidechain split source
plug::IPort *pScMode; // Sidechain mode
Expand Down Expand Up @@ -154,7 +161,7 @@ namespace lsp
typedef struct channel_t
{
dspu::Bypass sBypass; // Bypass
dspu::Filter sEnvBoost[2]; // Envelope boost filter
dspu::Filter sEnvBoost[3]; // Envelope boost filter
dspu::Delay sDelay; // Delay for lookahead compensation purpose
dspu::Delay sDryDelay; // Delay for dry signal
dspu::Delay sXOverDelay; // Delay for crossover
Expand All @@ -169,12 +176,14 @@ namespace lsp
float *vIn; // Input data buffer
float *vOut; // Output data buffer
float *vScIn; // Sidechain data buffer (if present)
float *vShmIn; // Shared memory link buffer (if present)

float *vInAnalyze; // Input signal analysis
float *vInBuffer; // Input buffer
float *vBuffer; // Common data processing buffer
float *vScBuffer; // Sidechain buffer
float *vExtScBuffer; // External sidechain buffer
float *vShmBuffer; // Shared memory link buffer
float *vTr; // Transfer function
float *vTrMem; // Transfer buffer (memory)

Expand All @@ -186,6 +195,7 @@ namespace lsp
plug::IPort *pIn; // Input
plug::IPort *pOut; // Output
plug::IPort *pScIn; // Sidechain
plug::IPort *pShmIn; // Shared memory link input
plug::IPort *pFftIn; // Pre-processing FFT analysis data
plug::IPort *pFftInSw; // Pre-processing FFT analysis control port
plug::IPort *pFftOut; // Post-processing FFT analysis data
Expand All @@ -199,12 +209,14 @@ namespace lsp
dspu::Analyzer sAnalyzer; // Analyzer
dspu::DynamicFilters sFilters; // Dynamic filters for each band in 'modern' mode
dspu::Counter sCounter; // Sync counter
size_t nMode; // Compressor mode
uint32_t nMode; // Compressor mode
bool bSidechain; // External side chain
bool bEnvUpdate; // Envelope filter update
bool bUseExtSc; // External sidechain is in use
bool bUseShmLink; // Shared memory link is in use
xover_mode_t enXOver; // Crossover mode
bool bStereoSplit; // Stereo split mode
size_t nEnvBoost; // Envelope boost
uint32_t nEnvBoost; // Envelope boost
channel_t *vChannels; // Compressor channels
float fInGain; // Input gain
float fDryGain; // Dry gain
Expand Down Expand Up @@ -245,6 +257,11 @@ namespace lsp

protected:
void do_destroy();
void preprocess_channel_input(size_t count);
uint32_t decode_sidechain_type(uint32_t sc) const;
void process_input_mono(float *out, const float *in, size_t count);
void process_input_stereo(float *l_out, float *r_out, const float *l_in, const float *r_in, size_t count);
const float *select_buffer(const comp_band_t *band, const channel_t *channel);

public:
explicit mb_compressor(const meta::plugin_t *metadata, bool sc, size_t mode);
Expand Down
18 changes: 16 additions & 2 deletions make/configure.mk
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,10 @@ define _modconfig =
$(if $($(name)_OBJ_TEST),, $(eval $(name)_OBJ_TEST := "$($(name)_BIN)/$($(name)_NAME)-test.o"))
$(if $($(name)_MFLAGS),, $(eval $(name)_MFLAGS := $(if $(publisher),,"-D$(name)_BUILTIN -fvisibility=hidden")))

$(if $(HOST_$(name)_NAME),, $(eval HOST_$(name)_NAME := $($(name)_NAME)))
$(if $(HOST_$(name)_DESC),, $(eval HOST_$(name)_DESC := $($(name)_DESC)))
$(if $(HOST_$(name)_URL),, $(eval HOST_$(name)_URL := $($(name)_URL$(X_URL_SUFFIX))))

$(if $(HOST_$(name)_PATH),, $(eval HOST_$(name)_PATH := $(MODULES)/$($(name)_NAME)))
$(if $(HOST_$(name)_INC),, $(eval HOST_$(name)_INC := $(HOST_$(name)_PATH)/include))
$(if $(HOST_$(name)_SRC),, $(eval HOST_$(name)_SRC := $(HOST_$(name)_PATH)/src))
Expand Down Expand Up @@ -164,6 +168,10 @@ define hdrconfig =
$(if $($(name)_TESTING),, $(eval $(name)_TESTING := 0))
$(if $($(name)_CFLAGS),, $(eval $(name)_CFLAGS := "$(if $($(name)_INC_OPT),$($(name)_INC_OPT) ,-I )\"$($(name)_INC)\""$(if $(publisher), "-D$(name)_PUBLISHER")))
$(if $($(name)_MFLAGS),, $(eval $(name)_MFLAGS := "-D$(name)_BUILTIN -fvisibility=hidden"))

$(if $(HOST_$(name)_NAME),, $(eval HOST_$(name)_NAME := $($(name)_NAME)))
$(if $(HOST_$(name)_DESC),, $(eval HOST_$(name)_DESC := $($(name)_DESC)))
$(if $(HOST_$(name)_URL),, $(eval HOST_$(name)_URL := $($(name)_URL$(X_URL_SUFFIX))))

$(if $(HOST_$(name)_PATH),, $(eval HOST_$(name)_PATH := $(MODULES)/$($(name)_NAME)))
$(if $(HOST_$(name)_INC),, $(eval HOST_$(name)_INC := $(HOST_$(name)_PATH)/include))
Expand Down Expand Up @@ -192,6 +200,9 @@ define plugconfig =
$(if $($(name)_OBJ_UI),, $(eval $(name)_OBJ_UI := "$($(name)_BIN)/$($(name)_NAME)-ui.o"))
$(if $($(name)_OBJ_TEST),, $(eval $(name)_OBJ_TEST := "$($(name)_BIN)/$($(name)_NAME)-test.o"))
$(if $($(name)_MFLAGS),, $(eval $(name)_MFLAGS := $(if $(publisher),,"-D$(name)_BUILTIN -fvisibility=hidden")))

$(if $(HOST_$(name)_NAME),, $(eval HOST_$(name)_NAME := $($(name)_NAME)))
$(if $(HOST_$(name)_DESC),, $(eval HOST_$(name)_DESC := $($(name)_DESC)))

$(if $(HOST_$(name)_PATH),, $(eval HOST_$(name)_PATH := $(MODULES)/$($(name)_NAME)))
$(if $(HOST_$(name)_INC),, $(eval HOST_$(name)_INC := $(HOST_$(name)_PATH)/include))
Expand Down Expand Up @@ -277,6 +288,8 @@ CONFIG_VARS = \
$(name)_OBJ_UI \
$(name)_OBJ_TEST \
\
HOST_$(name)_NAME \
HOST_$(name)_DESC \
HOST_$(name)_PATH \
HOST_$(name)_INC \
HOST_$(name)_SRC \
Expand Down Expand Up @@ -305,8 +318,9 @@ $(CONFIG_VARS): prepare
echo "$(@)=$($(@))" >> "$(CONFIG)"

config: $(CONFIG_VARS)
echo "Architecture: $(ARCHITECTURE_FAMILY)/$(ARCHITECTURE) ($(ARCHITECTURE_CFLAGS))"
echo "Features: $(FEATURES)"
echo "Host architecture: $(HOST_ARCHITECTURE_FAMILY)/$(HOST_ARCHITECTURE) ($(HOST_ARCHITECTURE_CFLAGS))"
echo "Architecture: $(ARCHITECTURE_FAMILY)/$(ARCHITECTURE) ($(ARCHITECTURE_CFLAGS))"
echo "Features: $(FEATURES)"
echo "Configured OK"

help: | pathvars toolvars sysvars
Expand Down
8 changes: 7 additions & 1 deletion make/modules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,15 @@ UNIQ_ALL_DEPENDENCIES := $(filter-out $(ARTIFACT_ID),$(call uniq, $(ALL_DEP
MODULES ?= $(BASEDIR)/modules
GIT ?= git

ifeq ($(DEVEL),1)
X_URL_SUFFIX = _RW
else
X_URL_SUFFIX = _RO
endif

ifeq ($(TREE),1)
$(foreach dep,$(UNIQ_ALL_DEPENDENCIES), \
$(eval $(dep)_URL=$($(dep)_URL_RO)) \
$(eval $(dep)_URL=$($(dep)_URL$(X_URL_SUFFIX))) \
)

ifeq ($(findstring -devel,$(ARTIFACT_VERSION)),-devel)
Expand Down
17 changes: 16 additions & 1 deletion make/paths.mk
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
ifndef PREFIX
ifeq ($(PLATFORM),Windows)
PREFIX := $(BASEDIR)/INSTALL
else ifeq ($(CROSS_COMPILE),1)
PREFIX := $(BASEDIR)/INSTALL
else
PREFIX := /usr/local
endif
Expand All @@ -42,7 +44,11 @@ SHAREDDIR := $(PREFIX)/share
INCDIR := $(PREFIX)/include
BUILDDIR := $(BASEDIR)/.build
TARGET_BUILDDIR := $(BUILDDIR)/target
HOST_BUILDDIR := $(BUILDDIR)/host
ifeq ($(CROSS_COMPILE),1)
HOST_BUILDDIR := $(BUILDDIR)/host
else
HOST_BUILDDIR := $(TARGET_BUILDDIR)
endif
MODULES := $(BASEDIR)/modules
CONFIG := $(BASEDIR)/.config.mk

Expand All @@ -61,6 +67,15 @@ ifndef INCDIR
INCDIR := $(PREFIX)/include
endif

# Shared resources
ifndef SHAREDDIR
ifeq ($(PLATFORM),Haiku)
SHAREDDIR := $(PREFIX)/data
else
SHAREDDIR := $(PREFIX)/share
endif
endif

# Temporary directory
ifndef TEMPDIR
ifeq ($(PLATFORM),Windows)
Expand Down
Loading

0 comments on commit 7d843fc

Please sign in to comment.