tags 445792 + patch

thank you

Here is a patch that fixes this plus several other issues.

Thank you,

Barry deFreese


reverted:
--- zynaddsubfx-2.2.1/src/Makefile.inc
+++ zynaddsubfx-2.2.1.orig/src/Makefile.inc
@@ -9,8 +9,8 @@
 FFTW_VERSION=3
 
 #Assembler FLOAT to INT conversions
+ASM_F2I=YES
+#ASM_F2I=NO
-#ASM_F2I=YES
-ASM_F2I=NO
 
 #Graphic user interface disable option (ZynAddSubFX will run only in text-mode)
 #DISABLE_GUI=YES
@@ -28,8 +28,8 @@
 #it will try OSS if JACK fails. At runtime you can set the OSS by default by 
command-line
 #parameters (run 'zynaddsubfx --help' for help) 
 
+#LINUX_AUDIOOUT=OSS_AND_JACK
+LINUX_AUDIOOUT=OSS
-LINUX_AUDIOOUT=OSS_AND_JACK
-#LINUX_AUDIOOUT=OSS
 #LINUX_AUDIOOUT=NONE
 #LINUX_AUDIOOUT=JACK
 #LINUX_AUDIOOUT=JACK_RT     JACK_RT support is broken
reverted:
--- zynaddsubfx-2.2.1/src/Synth/LFO.C
+++ zynaddsubfx-2.2.1.orig/src/Synth/LFO.C
@@ -108,12 +108,7 @@
         else out*=lfointensity*amp2;
     if (lfodelay<0.00001) {
            if (freqrndenabled==0) x+=incx;
+               else x+=incx*(incrnd*(1.0-x)+nextincrnd*x);
-               else {
-                   float tmp=(incrnd*(1.0-x)+nextincrnd*x);
-                   if (tmp>1.0) tmp=1.0;
-                       else if (tmp<0.0) tmp=0.0;
-                   x+=incx*tmp;
-               };
            if (x>=1) {
                x=fmod(x,1.0);
                amp1=amp2;
@@ -141,5 +136,6 @@
        if (freqrndenabled==0) return;
        incrnd=nextincrnd;
        nextincrnd=pow(0.5,lfofreqrnd)+RND*(pow(2.0,lfofreqrnd)-1.0);
+       if (nextincrnd*incx>=0.49999999) nextincrnd=1.0;
 };
 
reverted:
--- zynaddsubfx-2.2.1/src/Params/EnvelopeParams.C
+++ zynaddsubfx-2.2.1.orig/src/Params/EnvelopeParams.C
@@ -51,7 +51,7 @@
 };
 
 REALTYPE EnvelopeParams::getdt(char i){
+    REALTYPE result=(pow(2.0,Penvdt[i]/127.0*12.0)-1.0)*10.0;//miliseconds
-    REALTYPE result=(pow(2.0,Penvdt[(int)i]/127.0*12.0)-1.0)*10.0;//miliseconds
     return(result);
 };
 
reverted:
--- zynaddsubfx-2.2.1/src/Output/JACKaudiooutput.C
+++ zynaddsubfx-2.2.1.orig/src/Output/JACKaudiooutput.C
@@ -35,7 +35,6 @@
     jackmaster=master_;
     jackclient=0;
     char tmpstr[100];
-    const char **ports;
 
     for (int i=0;i<15;i++){
        if (i!=0) snprintf(tmpstr,100,"ZynAddSubFX_%d",i);
@@ -51,7 +50,7 @@
 
     fprintf(stderr,"Internal SampleRate   = %d\nJack Output SampleRate= 
%d\n",SAMPLE_RATE,jack_get_sample_rate(jackclient));
     if ((unsigned int)jack_get_sample_rate(jackclient)!=(unsigned int) 
SAMPLE_RATE) 
+       fprintf(stderr,"It is recomanded that the both samplerates to be 
equal.\n");
-       fprintf(stderr,"It is recommended that the both samplerates to be 
equal.\n");
     
     jack_set_process_callback(jackclient,jackprocess,0);    
     jack_set_sample_rate_callback(jackclient,jacksrate,0);    
@@ -67,20 +66,10 @@
        return(false);
     };
     
+    /*
-  
-   /* 
     jack_connect(jackclient,jack_port_name(outport_left),"alsa_pcm:out_1");
     jack_connect(jackclient,jack_port_name(outport_right),"alsa_pcm:out_2");
+     */
-   */
-
-    if ((ports = jack_get_ports (jackclient, NULL, NULL, 
JackPortIsPhysical|JackPortIsInput)) == NULL) 
-       fprintf(stderr,"Cannot connect to jack output, you may hear no 
sound\n");       else {
-      if (jack_connect(jackclient,jack_port_name(outport_left),ports[0]))
-       fprintf(stderr,"Cannot connect to left output port\n");
-      if (jack_connect(jackclient,jack_port_name(outport_right),ports[1]))
-       fprintf(stderr,"Cannot connect to right output port\n");
-    }
-     
      return(true);
 };
 
reverted:
--- zynaddsubfx-2.2.1/src/Output/OSSaudiooutput.C
+++ zynaddsubfx-2.2.1.orig/src/Output/OSSaudiooutput.C
@@ -31,19 +31,6 @@
 #include "OSSaudiooutput.h"
 #include "../Misc/Util.h"
 
-#if __BYTE_ORDER ==  __BIG_ENDIAN
-/* borrowed from glib2 */
-#define SHORT_SWAP_LE_BE(val)  ((short) ( \
-    (short) ((short) (val) >> 8) |     \
-    (short) ((short) (val) << 8)))
-
-void swap_endian(short *data, int length)
-{
-       int i;
-       for (i = 0; i < length; i += 1, data++)
-               *data = SHORT_SWAP_LE_BE(*data);
-}
-#endif
 OSSaudiooutput::OSSaudiooutput(){
     int i;
     int snd_bitsize=16;
@@ -89,9 +76,6 @@
        smps[i*2]=(short int) (l*32767.0);    
        smps[i*2+1]=(short int) (r*32767.0);
     };
-#if __BYTE_ORDER == __BIG_ENDIAN
-    swap_endian(smps, SOUND_BUFFER_SIZE*4);
-#endif
     write(snd_handle,smps,SOUND_BUFFER_SIZE*4);// *2 because is 16 bit, again 
* 2 because is stereo
 };
 
reverted:
--- zynaddsubfx-2.2.1/src/UI/BankUI.fl
+++ zynaddsubfx-2.2.1.orig/src/UI/BankUI.fl
@@ -35,8 +35,6 @@
   } {}
   decl {Bank *bank;} {public
   }
-  Function {~BankProcess_()} {return_type virtual
-  } {code {} {}}
 } 
 
 class BankSlot {: {public Fl_Button,BankProcess_}
reverted:
--- zynaddsubfx-2.2.1/src/UI/PartUI.fl
+++ zynaddsubfx-2.2.1.orig/src/UI/PartUI.fl
@@ -86,8 +86,6 @@
 class PartUI_ {} {
   Function {showparameters(int kititem,int engine)} {return_type virtual
   } {}
-  Function {~PartUI_()} {return_type virtual} { code {} {}
-  }
 } 
 
 class PartKitItem {: {public Fl_Group}
reverted:
--- zynaddsubfx-2.2.1/src/UI/VirKeyboard.fl
+++ zynaddsubfx-2.2.1.orig/src/UI/VirKeyboard.fl
@@ -168,8 +168,7 @@
   }
   Function {presskey(int nk,int exclusive,int type)} {} {
     code {if (nk>=N_OCT*12) return;
+if ((nk<0)&&(exclusive==0)) {
-if ((nk<0)) {
-  if(exclusive==0)
   relaseallkeys(type);
   return;
 };
reverted:
--- zynaddsubfx-2.2.1/src/main.C
+++ zynaddsubfx-2.2.1.orig/src/main.C
@@ -90,7 +90,7 @@
  * Try to get the realtime priority
  */
 void set_realtime(){
+#ifdef OS_LINUX
-#if 0
     sched_param sc;
     
     sc.sched_priority=50;
@@ -230,7 +230,7 @@
  */
 
 
+void initprogram(){
-void initprogram(int noui){
 #ifndef JACKAUDIOOUT
 #ifndef JACK_RTAUDIOOUT
     fprintf(stderr,"\nSample Rate = \t\t%d\n",SAMPLE_RATE);
@@ -284,8 +284,7 @@
     Midi=new NULLMidiIn();
 #endif
 #ifndef DISABLE_GUI
+    ui=new MasterUI(master,&Pexitprogram);
-    if (noui==0) 
-       ui=new MasterUI(master,&Pexitprogram);
 #endif
 };
 
@@ -476,10 +475,8 @@
        fprintf(stderr,"%s","  -D , --dump\t\t\t\t Dumps midi note ON/OFF 
commands\n");
        fprintf(stderr,"%s","  -U , --no-gui\t\t\t\t Run ZynAddSubFX without 
user interface\n");
 #ifdef JACKAUDIOOUT
-#ifdef OSSAUDIOOUT
        fprintf(stderr,"%s","  -A , --not-use-jack\t\t\t Use OSS/ALSA instead 
of JACK\n");
 #endif
-#endif
 #ifdef OS_WINDOWS
        fprintf(stderr,"%s","\nWARNING: On Windows systems, only short 
comandline parameters works.\n");
        fprintf(stderr,"%s","  eg. instead '--buffer-size=512' use '-b 512'\n");
@@ -490,7 +487,7 @@
     
     //---------
     
+    initprogram();
-    initprogram(noui);
 
     if (strlen(loadfile)>1){
         int tmp=master->loadXML(loadfile);
reverted:
--- zynaddsubfx-2.2.1/src/Makefile
+++ zynaddsubfx-2.2.1.orig/src/Makefile
@@ -1,7 +1,7 @@
 include Makefile.inc
 
 ifneq ($(MAKECMDGOALS),debug)
+  CXXFLAGS= -O6 -Wall 
-  CXXFLAGS= -O6 -Wall
 else 
   CXXFLAGS= -O0 -Wall -Wpointer-arith -Wstrict-prototypes
 endif
@@ -125,6 +125,3 @@
        rm -f */*.o *.o
        $(MAKE) -C UI $@
 
-install:
-       install -D zynaddsubfx $(DESTDIR)/usr/bin/zynaddsubfx
-#      install -d -m 755 ../banks $(DESTDIR)/usr/share/zynaddsubfx/
diff -u zynaddsubfx-2.2.1/debian/zynaddsubfx.desktop 
zynaddsubfx-2.2.1/debian/zynaddsubfx.desktop
--- zynaddsubfx-2.2.1/debian/zynaddsubfx.desktop
+++ zynaddsubfx-2.2.1/debian/zynaddsubfx.desktop
@@ -1,5 +1,4 @@
 [Desktop Entry]
-Encoding=UTF-8
 
 Name=ZynAddSubFX Software Synthesizer
 Name[pt]=Sintetizador por Software ZynAddSubFX
diff -u zynaddsubfx-2.2.1/debian/menu zynaddsubfx-2.2.1/debian/menu
--- zynaddsubfx-2.2.1/debian/menu
+++ zynaddsubfx-2.2.1/debian/menu
@@ -1,3 +1,3 @@
-?package(zynaddsubfx):needs="X11" section="Apps/Sound"\
+?package(zynaddsubfx):needs="X11" section="Applications/Sound"\
   title="zynaddsubfx" command="/usr/bin/zynaddsubfx"\
   icon="/usr/share/pixmaps/zynaddsubfx.xpm"
diff -u zynaddsubfx-2.2.1/debian/rules zynaddsubfx-2.2.1/debian/rules
--- zynaddsubfx-2.2.1/debian/rules
+++ zynaddsubfx-2.2.1/debian/rules
@@ -5,7 +5,7 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-
+include /usr/share/quilt/quilt.make
 
 
 CFLAGS = -Wall -g
@@ -29,7 +29,7 @@
 
 build: build-stamp
 
-build-stamp: configure-stamp 
+build-stamp: patch configure-stamp 
        dh_testdir
 
        # Add here commands to compile the package.
@@ -39,13 +39,13 @@
 
        touch build-stamp
 
-clean:
+clean: unpatch
        dh_testdir
        dh_testroot
        rm -f build-stamp configure-stamp
 
        # Add here commands to clean up after the build process.
-       -$(MAKE) -C src clean
+       [ ! -f Makefile ] || $(MAKE) -C src clean
 
        dh_clean
 
@@ -76,24 +76,12 @@
        dh_installchangelogs 
        dh_installdocs
        dh_installexamples
-#      dh_install
        dh_installmenu
-#      dh_installdebconf       
-#      dh_installlogrotate
-#      dh_installemacsen
-#      dh_installpam
-#      dh_installmime
-#      dh_installinit
-#      dh_installcron
-#      dh_installinfo
        dh_installman debian/zynaddsubfx.1
        dh_link
        dh_strip
        dh_compress
        dh_fixperms
-#      dh_perl
-#      dh_python
-#      dh_makeshlibs
        dh_installdeb
        dh_shlibdeps
        dh_gencontrol
diff -u zynaddsubfx-2.2.1/debian/control zynaddsubfx-2.2.1/debian/control
--- zynaddsubfx-2.2.1/debian/control
+++ zynaddsubfx-2.2.1/debian/control
@@ -2,8 +2,9 @@
 Section: sound
 Priority: extra
 Maintainer: Eduardo Marcel Macan <[EMAIL PROTECTED]>
-Build-Depends: debhelper (>> 4.0.0), fluid (>= 1.1.3+1.1.4rc1), 
libjack0.100.0-dev, libfltk1.1-dev (>= 1.1.3+1.1.4rc1), libasound2-dev (>= 
0.9.4), fftw3-dev (>=3.0.1-11), libmxml-dev (>= 2.0), zlib1g-dev
-Standards-Version: 3.6.2.2
+Build-Depends: debhelper (>> 5.0.0), quilt, fluid (>= 1.1.3+1.1.4rc1), 
libjack0.100.0-dev, libfltk1.1-dev (>= 1.1.3+1.1.4rc1), libasound2-dev (>= 
0.9.4) [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386], libmxml-dev (>= 2.0), 
zlib1g-dev, libfftw3-dev
+Standards-Version: 3.7.3
+Homepage: http://zynaddsubfx.sourceforge.net
 
 Package: zynaddsubfx
 Architecture: any
diff -u zynaddsubfx-2.2.1/debian/compat zynaddsubfx-2.2.1/debian/compat
--- zynaddsubfx-2.2.1/debian/compat
+++ zynaddsubfx-2.2.1/debian/compat
@@ -1 +1 @@
-4
+5
diff -u zynaddsubfx-2.2.1/debian/changelog zynaddsubfx-2.2.1/debian/changelog
--- zynaddsubfx-2.2.1/debian/changelog
+++ zynaddsubfx-2.2.1/debian/changelog
@@ -1,3 +1,33 @@
+zynaddsubfx (2.2.1-4.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Change fftw3-dev build-dep to libfftw3-dev (Closes: #445792)
+  * Add quilt patching system
+  * Make clean not ignore errors in rules
+  * Remove unused debhelper commands in rules
+  * debian/menu - Change section Apps/Sound to Sound
+  * Add watch file
+  * Add Homepage field in control
+  * Remove deprecated encoding field from desktop file
+  * 01_kfreebsd_fix.patch (Closes: #415675)
+    + src/Makefile.inc - fall back to OSS on kfreebsd
+  * Move previous source changes to patches
+    + 015_oss_and_jack.patch - Use OSS_AND_JACK, not just OSS
+    + 02_makefile.patch - Add install target
+    + 03_main.patch - Add noui as a parameter to initprogram()
+    + 04_virkeyboard.patch - Warning and crash caused in virtual keyboard
+      + patch by Guus Sliepen
+    + 05_partui.patch - Add PartUI_() function
+    + 06_bankui.patch - Add BankProcess_() function
+    + 07_ossaudiooutput.patch - Big Endian Fix
+    + 08_jackaudiooutput.patch - Add jack ports
+    + 09_envelopeparams.patch - Set realtime priority accordingly
+    + 10_LFO.patch - Improve frequency randomizer
+  * Bump debhelper build-dep and compat to 5
+  * Bump standards version to 3.7.3
+
+ -- Barry deFreese <[EMAIL PROTECTED]>  Sun, 16 Dec 2007 17:59:25 -0500
+
 zynaddsubfx (2.2.1-4) unstable; urgency=low
 
   * Added zlib1g-dev to the build dependencies (closes: #352014) 
only in patch2:
unchanged:
--- zynaddsubfx-2.2.1.orig/debian/watch
+++ zynaddsubfx-2.2.1/debian/watch
@@ -0,0 +1,3 @@
+version=3
+
+http://sf.net/zynaddsubfx/ZynAddSubFX-([\d.]+)\.tar\.bz2
only in patch2:
unchanged:
--- zynaddsubfx-2.2.1.orig/debian/patches/015_oss_and_jack.patch
+++ zynaddsubfx-2.2.1/debian/patches/015_oss_and_jack.patch
@@ -0,0 +1,25 @@
+diff -urN zynaddsubfx-2.2.1.orig/src/Makefile.inc 
zynaddsubfx-2.2.1/src/Makefile.inc
+--- zynaddsubfx-2.2.1.orig/src/Makefile.inc    2005-04-27 20:21:35.000000000 
-0400
++++ zynaddsubfx-2.2.1/src/Makefile.inc 2007-12-16 20:10:02.000000000 -0500
+@@ -9,8 +9,8 @@
+ FFTW_VERSION=3
+ 
+ #Assembler FLOAT to INT conversions
+-ASM_F2I=YES
+-#ASM_F2I=NO
++#ASM_F2I=YES
++ASM_F2I=NO
+ 
+ #Graphic user interface disable option (ZynAddSubFX will run only in 
text-mode)
+ #DISABLE_GUI=YES
+@@ -28,8 +28,8 @@
+ #it will try OSS if JACK fails. At runtime you can set the OSS by default by 
command-line
+ #parameters (run 'zynaddsubfx --help' for help) 
+ 
+-#LINUX_AUDIOOUT=OSS_AND_JACK
+-LINUX_AUDIOOUT=OSS
++LINUX_AUDIOOUT=OSS_AND_JACK
++#LINUX_AUDIOOUT=OSS
+ #LINUX_AUDIOOUT=NONE
+ #LINUX_AUDIOOUT=JACK
+ #LINUX_AUDIOOUT=JACK_RT     JACK_RT support is broken
only in patch2:
unchanged:
--- zynaddsubfx-2.2.1.orig/debian/patches/04_virkeyboard.patch
+++ zynaddsubfx-2.2.1/debian/patches/04_virkeyboard.patch
@@ -0,0 +1,13 @@
+--- zynaddsubfx-2.2.1.orig/src/UI/VirKeyboard.fl
++++ zynaddsubfx-2.2.1/src/UI/VirKeyboard.fl
+@@ -168,7 +168,8 @@
+   }
+   Function {presskey(int nk,int exclusive,int type)} {} {
+     code {if (nk>=N_OCT*12) return;
+-if ((nk<0)&&(exclusive==0)) {
++if ((nk<0)) {
++  if(exclusive==0)
+   relaseallkeys(type);
+   return;
+ };
+
only in patch2:
unchanged:
--- zynaddsubfx-2.2.1.orig/debian/patches/10_LFO.patch
+++ zynaddsubfx-2.2.1/debian/patches/10_LFO.patch
@@ -0,0 +1,24 @@
+diff -urN zynaddsubfx-2.2.1.orig/src/Synth/LFO.C 
zynaddsubfx-2.2.1/src/Synth/LFO.C
+--- zynaddsubfx-2.2.1.orig/src/Synth/LFO.C     2005-03-14 15:00:00.000000000 
-0500
++++ zynaddsubfx-2.2.1/src/Synth/LFO.C  2007-12-17 06:48:14.000000000 -0500
+@@ -108,7 +108,12 @@
+         else out*=lfointensity*amp2;
+     if (lfodelay<0.00001) {
+           if (freqrndenabled==0) x+=incx;
+-              else x+=incx*(incrnd*(1.0-x)+nextincrnd*x);
++               else {
++                   float tmp=(incrnd*(1.0-x)+nextincrnd*x);
++                   if (tmp>1.0) tmp=1.0;
++                       else if (tmp<0.0) tmp=0.0;
++                   x+=incx*tmp;
++               };
+           if (x>=1) {
+               x=fmod(x,1.0);
+               amp1=amp2;
+@@ -136,6 +141,5 @@
+       if (freqrndenabled==0) return;
+       incrnd=nextincrnd;
+       nextincrnd=pow(0.5,lfofreqrnd)+RND*(pow(2.0,lfofreqrnd)-1.0);
+-      if (nextincrnd*incx>=0.49999999) nextincrnd=1.0;
+ };
+ 
only in patch2:
unchanged:
--- zynaddsubfx-2.2.1.orig/debian/patches/03_main.patch
+++ zynaddsubfx-2.2.1/debian/patches/03_main.patch
@@ -0,0 +1,51 @@
+diff -urN zynaddsubfx-2.2.1.orig/src/main.C zynaddsubfx-2.2.1/src/main.C
+--- zynaddsubfx-2.2.1.orig/src/main.C  2005-04-27 20:15:28.000000000 -0400
++++ zynaddsubfx-2.2.1/src/main.C       2007-12-16 20:16:35.000000000 -0500
+@@ -90,7 +90,7 @@
+  * Try to get the realtime priority
+  */
+ void set_realtime(){
+-#ifdef OS_LINUX
++#if 0
+     sched_param sc;
+     
+     sc.sched_priority=50;
+@@ -230,7 +230,7 @@
+  */
+ 
+ 
+-void initprogram(){
++void initprogram(int noui){
+ #ifndef JACKAUDIOOUT
+ #ifndef JACK_RTAUDIOOUT
+     fprintf(stderr,"\nSample Rate = \t\t%d\n",SAMPLE_RATE);
+@@ -284,7 +284,8 @@
+     Midi=new NULLMidiIn();
+ #endif
+ #ifndef DISABLE_GUI
+-    ui=new MasterUI(master,&Pexitprogram);
++    if (noui==0)
++       ui=new MasterUI(master,&Pexitprogram);
+ #endif
+ };
+ 
+@@ -475,8 +476,10 @@
+       fprintf(stderr,"%s","  -D , --dump\t\t\t\t Dumps midi note ON/OFF 
commands\n");
+       fprintf(stderr,"%s","  -U , --no-gui\t\t\t\t Run ZynAddSubFX without 
user interface\n");
+ #ifdef JACKAUDIOOUT
++#ifdef OSSAUDIOOUT
+       fprintf(stderr,"%s","  -A , --not-use-jack\t\t\t Use OSS/ALSA instead 
of JACK\n");
+ #endif
++#endif
+ #ifdef OS_WINDOWS
+       fprintf(stderr,"%s","\nWARNING: On Windows systems, only short 
comandline parameters works.\n");
+       fprintf(stderr,"%s","  eg. instead '--buffer-size=512' use '-b 512'\n");
+@@ -487,7 +490,7 @@
+     
+     //---------
+     
+-    initprogram();
++    initprogram(noui);
+ 
+     if (strlen(loadfile)>1){
+         int tmp=master->loadXML(loadfile);
only in patch2:
unchanged:
--- zynaddsubfx-2.2.1.orig/debian/patches/07_ossaudiooutput.patch
+++ zynaddsubfx-2.2.1/debian/patches/07_ossaudiooutput.patch
@@ -0,0 +1,33 @@
+--- zynaddsubfx-2.2.1.orig/src/Output/OSSaudiooutput.C
++++ zynaddsubfx-2.2.1/src/Output/OSSaudiooutput.C
+@@ -31,6 +31,19 @@
+ #include "OSSaudiooutput.h"
+ #include "../Misc/Util.h"
+
++#if __BYTE_ORDER ==  __BIG_ENDIAN
++/* borrowed from glib2 */
++#define SHORT_SWAP_LE_BE(val)  ((short) ( \
++    (short) ((short) (val) >> 8) |     \
++    (short) ((short) (val) << 8)))
++
++void swap_endian(short *data, int length)
++{
++       int i;
++       for (i = 0; i < length; i += 1, data++)
++               *data = SHORT_SWAP_LE_BE(*data);
++}
++#endif
+ OSSaudiooutput::OSSaudiooutput(){
+     int i;
+     int snd_bitsize=16;
+@@ -76,6 +89,9 @@
+        smps[i*2]=(short int) (l*32767.0);
+        smps[i*2+1]=(short int) (r*32767.0);
+     };
++#if __BYTE_ORDER == __BIG_ENDIAN
++    swap_endian(smps, SOUND_BUFFER_SIZE*4);
++#endif
+     write(snd_handle,smps,SOUND_BUFFER_SIZE*4);// *2 because is 16 bit, again 
* 2 because is stereo
+ };
+
+
only in patch2:
unchanged:
--- zynaddsubfx-2.2.1.orig/debian/patches/01_kfreebsd_fix.patch
+++ zynaddsubfx-2.2.1/debian/patches/01_kfreebsd_fix.patch
@@ -0,0 +1,14 @@
+--- zynaddsubfx-2.2.1/src/Makefile.inc 2007-03-21 09:02:08.530426000 +0100
++++ zynaddsubfx-2.2.1/src/Makefile.inc 2007-03-21 09:04:07.000000000 +0100
+@@ -18,7 +18,12 @@
+ 
+ # L I N U X   C O N F I G U R A T I O N
+ #Next line sets the midi input. It can be "ALSA", "OSS" or "NONE".
++ifeq ($(shell uname -s),Linux)
+ LINUX_MIDIIN=ALSA
++else
++# Fallback for GNU/k*BSD
++LINUX_MIDIIN=OSS
++endif
+ #LINUX_MIDIIN=OSS
+ #LINUX_MIDIIN=NONE
only in patch2:
unchanged:
--- zynaddsubfx-2.2.1.orig/debian/patches/series
+++ zynaddsubfx-2.2.1/debian/patches/series
@@ -0,0 +1,11 @@
+01_kfreebsd_fix.patch
+015_oss_and_jack.patch
+02_makefile.patch
+03_main.patch
+04_virkeyboard.patch
+05_partui.patch
+06_bankui.patch
+07_ossaudiooutput.patch
+08_jackaudiooutput.patch
+09_envelopeparams.patch
+10_LFO.patch
only in patch2:
unchanged:
--- zynaddsubfx-2.2.1.orig/debian/patches/08_jackaudiooutput.patch
+++ zynaddsubfx-2.2.1/debian/patches/08_jackaudiooutput.patch
@@ -0,0 +1,42 @@
+diff -urN zynaddsubfx-2.2.1.orig/src/Output/JACKaudiooutput.C 
zynaddsubfx-2.2.1/src/Output/JACKaudiooutput.C
+--- zynaddsubfx-2.2.1.orig/src/Output/JACKaudiooutput.C        2005-03-12 
13:16:26.000000000 -0500
++++ zynaddsubfx-2.2.1/src/Output/JACKaudiooutput.C     2007-12-17 
06:39:20.000000000 -0500
+@@ -35,6 +35,7 @@
+     jackmaster=master_;
+     jackclient=0;
+     char tmpstr[100];
++    const char **ports;
+ 
+     for (int i=0;i<15;i++){
+       if (i!=0) snprintf(tmpstr,100,"ZynAddSubFX_%d",i);
+@@ -50,7 +51,7 @@
+ 
+     fprintf(stderr,"Internal SampleRate   = %d\nJack Output SampleRate= 
%d\n",SAMPLE_RATE,jack_get_sample_rate(jackclient));
+     if ((unsigned int)jack_get_sample_rate(jackclient)!=(unsigned int) 
SAMPLE_RATE) 
+-      fprintf(stderr,"It is recomanded that the both samplerates to be 
equal.\n");
++      fprintf(stderr,"It is recommended that both of the samplerates be 
equal.\n");
+     
+     jack_set_process_callback(jackclient,jackprocess,0);    
+     jack_set_sample_rate_callback(jackclient,jacksrate,0);    
+@@ -66,10 +67,19 @@
+       return(false);
+     };
+     
+-    /*
++   /*
+     jack_connect(jackclient,jack_port_name(outport_left),"alsa_pcm:out_1");
+     jack_connect(jackclient,jack_port_name(outport_right),"alsa_pcm:out_2");
+-     */
++   */
++
++    if ((ports = jack_get_ports (jackclient, NULL, NULL, 
JackPortIsPhysical|JackPortIsInput)) == NULL)
++       fprintf(stderr,"Cannot connect to jack output, you may hear no 
sound\n");       else {
++      if (jack_connect(jackclient,jack_port_name(outport_left),ports[0]))
++       fprintf(stderr,"Cannot connect to left output port\n");
++      if (jack_connect(jackclient,jack_port_name(outport_right),ports[1]))
++       fprintf(stderr,"Cannot connect to right output port\n");
++    }
++
+      return(true);
+ };
+ 
only in patch2:
unchanged:
--- zynaddsubfx-2.2.1.orig/debian/patches/06_bankui.patch
+++ zynaddsubfx-2.2.1/debian/patches/06_bankui.patch
@@ -0,0 +1,13 @@
+diff -urN zynaddsubfx-2.2.1.orig/src/UI/BankUI.fl 
zynaddsubfx-2.2.1/src/UI/BankUI.fl
+--- zynaddsubfx-2.2.1.orig/src/UI/BankUI.fl    2005-03-14 14:54:34.000000000 
-0500
++++ zynaddsubfx-2.2.1/src/UI/BankUI.fl 2007-12-16 20:21:20.000000000 -0500
+@@ -35,6 +35,9 @@
+   } {}
+   decl {Bank *bank;} {public
+   }
++  Function {~BankProcess_()} {return_type virtual
++  } {code {} {}}
++
+ } 
+ 
+ class BankSlot {: {public Fl_Button,BankProcess_}
only in patch2:
unchanged:
--- zynaddsubfx-2.2.1.orig/debian/patches/02_makefile.patch
+++ zynaddsubfx-2.2.1/debian/patches/02_makefile.patch
@@ -0,0 +1,11 @@
+diff -urN zynaddsubfx-2.2.1.orig/src/Makefile zynaddsubfx-2.2.1/src/Makefile
+--- zynaddsubfx-2.2.1.orig/src/Makefile        2005-04-27 19:45:52.000000000 
-0400
++++ zynaddsubfx-2.2.1/src/Makefile     2007-12-16 20:04:06.000000000 -0500
+@@ -125,3 +125,6 @@
+       rm -f */*.o *.o
+       $(MAKE) -C UI $@
+ 
++install:
++      install -D zynaddsubfx $(DESTDIR)/usr/bin/zynaddsubfx
++#     install -d -m 755 ../banks $(DESTDIR)/usr/share/zynaddsubfx/
+
only in patch2:
unchanged:
--- zynaddsubfx-2.2.1.orig/debian/patches/05_partui.patch
+++ zynaddsubfx-2.2.1/debian/patches/05_partui.patch
@@ -0,0 +1,13 @@
+diff -urN zynaddsubfx-2.2.1.orig/src/UI/PartUI.fl 
zynaddsubfx-2.2.1/src/UI/PartUI.fl
+--- zynaddsubfx-2.2.1.orig/src/UI/PartUI.fl    2005-03-14 14:54:37.000000000 
-0500
++++ zynaddsubfx-2.2.1/src/UI/PartUI.fl 2007-12-16 20:19:18.000000000 -0500
+@@ -86,6 +86,9 @@
+ class PartUI_ {} {
+   Function {showparameters(int kititem,int engine)} {return_type virtual
+   } {}
++  Function {~PartUI_()} {return_type virtual} { code {} {}
++  }
++
+ } 
+ 
+ class PartKitItem {: {public Fl_Group}
only in patch2:
unchanged:
--- zynaddsubfx-2.2.1.orig/debian/patches/09_envelopeparams.patch
+++ zynaddsubfx-2.2.1/debian/patches/09_envelopeparams.patch
@@ -0,0 +1,12 @@
+--- zynaddsubfx-2.2.1.orig/src/Params/EnvelopeParams.C
++++ zynaddsubfx-2.2.1/src/Params/EnvelopeParams.C
+@@ -51,7 +51,7 @@
+ };
+
+ REALTYPE EnvelopeParams::getdt(char i){
+-    REALTYPE result=(pow(2.0,Penvdt[i]/127.0*12.0)-1.0)*10.0;//miliseconds
++    REALTYPE 
result=(pow(2.0,Penvdt[(int)i]/127.0*12.0)-1.0)*10.0;//miliseconds
+     return(result);
+ };
+
+

Reply via email to