From f30690293e275ea7539ff2b7e63bf90fc35091c8 Mon Sep 17 00:00:00 2001 From: Holger Wirtz Date: Tue, 29 Nov 2016 10:17:29 +0000 Subject: [PATCH] Fixed problems with debug output from LVTK in Makefile. --- src/Makefile | 5 ++--- src/dexed.cpp | 5 ----- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/Makefile b/src/Makefile index e0d0f0f..8a1801f 100644 --- a/src/Makefile +++ b/src/Makefile @@ -2,7 +2,7 @@ BUNDLE=dexed.lv2 INSTALL_DIR=/home/pi/zynthian/zynthian-plugins/mod-lv2 TARGET=dexed.so OBJ=fm_core.o env.o lfo.o dx7note.o sin.o pitchenv.o fm_op_kernel.o freqlut.o exp2.o EngineMkI.o EngineOpl.o PluginFx.o trace.o -CFLAGS=-fPIC -DPIC -std=c++11 -I. -I/usr/local/include/lvtk-2 +CFLAGS=-fPIC -DPIC -std=c++11 -I. -I/usr/local/include/lvtk-2 -DLVTK_DEBUG=false LDFLAGS=-L/usr/local/lib -llvtk_plugin2 ifeq ($(ARCH),) @@ -36,13 +36,12 @@ ifneq (,$(findstring aarch64,$(machine))) endif ifneq ($(findstring arm,$(ARCH)),) - CXXFLAGS += -DRASPI + CXXFLAGS += endif ifeq ($(DEBUG), 1) CXXFLAGS += -DDEBUG $(CFLAGS) else - #CXXFLAGS += -Ofast $(CFLAGS) -DRASPI CXXFLAGS += -Ofast $(CFLAGS) $(CPU) $(FPU) endif diff --git a/src/dexed.cpp b/src/dexed.cpp index 0cc74e9..0181f6e 100644 --- a/src/dexed.cpp +++ b/src/dexed.cpp @@ -372,12 +372,7 @@ void Dexed::GetSamples(uint32_t n_samples, float* buffer) voices[note].dx7_note->compute(audiobuf.get(), lfovalue, lfodelay, &controllers); for (uint32_t j=0; j < N; ++j) { int32_t val = audiobuf.get()[j]; -#ifndef RASPI val = val >> 4; -#else - //val*=2; - val=val<<2; // hope this is an arithmetic shift! -#endif int32_t clip_val = val < -(1 << 24) ? 0x8000 : val >= (1 << 24) ? 0x7fff : val >> 9; float f = float(clip_val) / float(0x8000); if(f>1.0)