summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'media-sound/zynaddsubfx/files/zynaddsubfx-2.1.1-gcc34_mem_hack.patch')
-rw-r--r--media-sound/zynaddsubfx/files/zynaddsubfx-2.1.1-gcc34_mem_hack.patch49
1 files changed, 49 insertions, 0 deletions
diff --git a/media-sound/zynaddsubfx/files/zynaddsubfx-2.1.1-gcc34_mem_hack.patch b/media-sound/zynaddsubfx/files/zynaddsubfx-2.1.1-gcc34_mem_hack.patch
new file mode 100644
index 000000000000..c01058513379
--- /dev/null
+++ b/media-sound/zynaddsubfx/files/zynaddsubfx-2.1.1-gcc34_mem_hack.patch
@@ -0,0 +1,49 @@
+diff -burN /var/tmp/portage/zynaddsubfx-2.1.1/work/ZynAddSubFX-2.1.1/src/DSP/AnalogFilter.C ZynAddSubFX-2.1.1/src/DSP/AnalogFilter.C
+--- /var/tmp/portage/zynaddsubfx-2.1.1/work/ZynAddSubFX-2.1.1/src/DSP/AnalogFilter.C 2004-07-30 19:02:17.000000000 -0500
++++ ZynAddSubFX-2.1.1/src/DSP/AnalogFilter.C 2004-10-17 02:08:08.819079515 -0500
+@@ -144,7 +144,10 @@
+ tmp=1+alpha;
+ c[0]=alpha/tmp*sqrt(tmpq+1);
+ c[1]=0;
++ char *gcc34_mem_hack = new char[600];
++ sprintf(gcc34_mem_hack, "%f", c[2]);
+ c[2]=-alpha/tmp*sqrt(tmpq+1);
++ delete gcc34_mem_hack; gcc34_mem_hack = NULL; /* new char[600]; */
+ d[1]=-2*cs/tmp*(-1);
+ d[2]=(1-alpha)/tmp*(-1);
+ } else {
+diff -burN /var/tmp/portage/zynaddsubfx-2.1.1/work/ZynAddSubFX-2.1.1/src/Synth/OscilGen.C ZynAddSubFX-2.1.1/src/Synth/OscilGen.C
+--- /var/tmp/portage/zynaddsubfx-2.1.1/work/ZynAddSubFX-2.1.1/src/Synth/OscilGen.C 2004-08-25 17:12:40.000000000 -0500
++++ ZynAddSubFX-2.1.1/src/Synth/OscilGen.C 2004-10-17 02:07:51.383828815 -0500
+@@ -674,10 +674,31 @@
+
+ for (i=0;i<OSCIL_SIZE;i++) oscilFFTfreqs[i]=0.0;
+ if (Pcurrentbasefunc==0) {//the sine case
++ char *gcc34_mem_hack = new char[600];
+ for (i=0;i<MAX_AD_HARMONICS;i++){
++ sprintf(gcc34_mem_hack,
++ "i=%d " \
++ "MAX_AD_HARMONICS=%d " \
++ "oscilFFTfreqs[i+1]=%f " \
++ "hmag[i]=%f" \
++ "hphase[i]=%f" \
++ "oscilFFTfreqs[OSCIL_SIZE-i-1]=%f" \
++ "OSCIL_SIZE-i-1=%d" \
++ "OSCIL_SIZE=%d" \
++ "\n",
++ i,
++ MAX_AD_HARMONICS,
++ oscilFFTfreqs[i+1],
++ hmag[i],
++ hphase[i],
++ oscilFFTfreqs[OSCIL_SIZE-i-1],
++ OSCIL_SIZE-i-1,
++ OSCIL_SIZE
++ );
+ oscilFFTfreqs[i+1]=-hmag[i]*sin(hphase[i]*(i+1))/2.0;
+ oscilFFTfreqs[OSCIL_SIZE-i-1]=hmag[i]*cos(hphase[i]*(i+1))/2.0;
+ };
++ delete gcc34_mem_hack; gcc34_mem_hack = NULL; /* new char[600]; */
+ } else {
+ for (j=0;j<MAX_AD_HARMONICS;j++){
+ if (Phmag[j]==64) continue;