Fixed problems with debug output from LVTK in Makefile.

pull/1/head
Holger Wirtz 8 years ago
parent 7634ad2e2c
commit f30690293e
  1. 5
      src/Makefile
  2. 5
      src/dexed.cpp

@ -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

@ -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)

Loading…
Cancel
Save