summaryrefslogtreecommitdiff
path: root/audio/mpg123/patches/patch-ak
blob: 1442e5fbb80f89f4b830bee129b12909612bb0c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
$NetBSD: patch-ak,v 1.1 1999/10/12 04:43:15 simonb Exp $

--- tabinit.c.orig	Mon Feb 15 23:55:11 1999
+++ tabinit.c	Thu Aug 12 17:31:33 1999
@@ -56,7 +56,7 @@
     kr=0x10>>i; divv=0x40>>i;
     costab = pnts[i];
     for(k=0;k<kr;k++)
-      costab[k] = 1.0 / (2.0 * cos(M_PI * ((double) k * 2.0 + 1.0) / (double) divv));
+      costab[k] = DOUBLE_TO_REAL(1.0 / (2.0 * cos(M_PI * ((double) k * 2.0 + 1.0) / (double) divv)));
 #ifdef USE_3DNOW
     for(k=0;k<kr;k++)
       costab[k+kr] = -costab[k];
@@ -69,7 +69,7 @@
   for(i=0,j=0;i<256;i++,j++,idx+=32)
   {
     if(idx < 512+16)
-      decwin[idx+16] = decwin[idx] = (double) intwinbase[j] / 65536.0 * (double) scaleval;
+      decwin[idx+16] = decwin[idx] = DOUBLE_TO_REAL((double) intwinbase[j] / 65536.0 * (double) scaleval);
 
     if(i % 32 == 31)
       idx -= 1023;
@@ -80,7 +80,7 @@
   for( /* i=256 */ ;i<512;i++,j--,idx+=32)
   {
     if(idx < 512+16)
-      decwin[idx+16] = decwin[idx] = (double) intwinbase[j] / 65536.0 * (double) scaleval;
+      decwin[idx+16] = decwin[idx] = DOUBLE_TO_REAL((double) intwinbase[j] / 65536.0 * (double) scaleval);
 
     if(i % 32 == 31)
       idx -= 1023;
@@ -91,7 +91,7 @@
 #ifdef USE_3DNOW
   if(!param.down_sample) {
     for(i=0;i<512+32;i++) {
-      decwin[512+31-i] *= 65536.0; /* allows faster clipping in 3dnow code */
+      decwin[512+31-i] = REAL_MUL(decwin[512+31-i], 65536.0); /* allows faster clipping in 3dnow code */
       decwin[512+32+i] = decwin[512+31-i];
     }
   }