zynaddsubfx

ZynAddSubFX open source synthesizer
Log | Files | Refs | Submodules | LICENSE

commit 94136c94bc08cf30dfd836fb3ce301a955c16f27
parent 99124ab200904fa557900a7e5947156f18bd5eb5
Author: paulnasca <paulnasca>
Date:   Thu, 27 Jan 2005 20:44:26 +0000

*** empty log message ***

Diffstat:
MChangeLog | 3++-
Msrc/Makefile | 10+++++++---
Msrc/Makefile.inc | 11+++++++++++
Msrc/Misc/Bank.C | 28++++++++++++++++++++++++----
Msrc/Output/Makefile | 4++++
5 files changed, 48 insertions(+), 8 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -752,4 +752,5 @@ 04 Ian 2005 - Corectata o mica eroare care facea ca sa nu arate Force Release la Freemode Envelope 15 Ian 2005 - Corectata o eroare la controllerul bandwidth care facea ca sa ajunga la valoarea 0 si sa dea peste cap SUBsynth - +22 Ian 2005 - Inceput sa scriu suportul pt. DSSI +27 Ian 2005 - Corectata eroare care facea ca in cazul in care sunt 2 banci cu acelasi nume (sau aceeasi bank root dir sa fie selectat de 2 ori) sa produca confuzie diff --git a/src/Makefile b/src/Makefile @@ -73,10 +73,14 @@ all: rm -f Make.deps -ifneq ($(AUDIOOUT),VST) - $(CXX) -o zynaddsubfx */*.o *.o $(LIBS) +ifeq ($(AUDIOOUT),DSSI) + gcc -shared -o zynaddsubfx.so */*.o *.o $(LIBS) else +ifeq ($(AUDIOOUT),VST) gcc -shared -o zynaddsubfx_vst.dll */*.o *.o $(LIBS) zynaddsubfx_gcc.def +else + $(CXX) -o zynaddsubfx */*.o *.o $(LIBS) +endif endif subdirs: $(SUBDIRS) @@ -96,7 +100,7 @@ main.o:Misc/Master.h Misc/Util.h Output/OSSaudiooutput.h\ .PHONY : clean clean: - rm -f $(objects) zynaddsubfx zynaddsubfx_vst.dll zynaddsubfx.exe + rm -f $(objects) zynaddsubfx zynaddsubfx_vst.dll zynaddsubfx.exe zynaddsubfx.so @for name in $(SUBDIRS); do sh -c "make -C $$name $@"; done rm -f Make.deps rm -f */*.o *.o diff --git a/src/Makefile.inc b/src/Makefile.inc @@ -33,6 +33,12 @@ LINUX_AUDIOOUT=OSS #LINUX_AUDIOOUT=PA +#Next line sets if the synth is compiled for DSSI plugin (as .so file) +#If this setting is "YES", MIDI in and AUDIOOUT are set automatically to DSSI +LINUX_DSSI=NO +#LINUX_DSSI=YES + + # W I N D O W S C O N F I G U R A T I O N #Next line sets the midi input @@ -54,9 +60,14 @@ ifeq ($(OS_PORT),LINUX) MIDIIN=$(LINUX_MIDIIN) AUDIOOUT=$(LINUX_AUDIOOUT) WINDOWS_VST=NO + ifeq ($(LINUX_DSSI),YES) + MIDIIN=DSSI + AUDIOOUT=DSSI + endif else MIDIIN=$(WINDOWS_MIDIIN) AUDIOOUT=$(WINDOWS_AUDIOOUT) + LINUX_DSSI=NO ifeq ($(WINDOWS_VST),YES) MIDIIN=VST AUDIOOUT=VST diff --git a/src/Misc/Bank.C b/src/Misc/Bank.C @@ -388,13 +388,33 @@ void Bank::rescanforbanks(){ banks[j].name=tmpname; banks[j].dir=tmpdir; -/* bankstruct tmp=banks[i]; - banks[i]=banks[j]; - banks[j]=tmp; -*/ }; }; }; + + //remove duplicate bank names + int dupl=0; + for (int j=0;j<MAX_NUM_BANKS-1;j++){ + for (int i=j+1;i<MAX_NUM_BANKS;i++){ + if ((banks[i].name==NULL)||(banks[j].name==NULL)) continue; + if (strcmp(banks[i].name,banks[j].name)==0) {//add a [1] to the first bankname and [n] to others + char *tmpname=banks[i].name; + banks[i].name=new char[strlen(tmpname)+100]; + sprintf(banks[i].name,"%s[%d]",tmpname,dupl+2); + delete(tmpname); + + if (dupl==0){ + char *tmpname=banks[j].name; + banks[j].name=new char[strlen(tmpname)+100]; + sprintf(banks[j].name,"%s[1]",tmpname); + delete(tmpname); + }; + + dupl++; + } else dupl=0; + }; + }; + }; diff --git a/src/Output/Makefile b/src/Output/Makefile @@ -10,6 +10,10 @@ ifeq ($(AUDIOOUT),JACK) objects+=JACKaudiooutput.o endif +ifeq ($(AUDIOOUT),DSSI) +objects+=DSSIaudiooutput.o +endif + ifeq ($(AUDIOOUT),JACK_RT) objects+=JACK_RTaudiooutput.o endif