aboutsummaryrefslogtreecommitdiffhomepage
path: root/mp3lib
diff options
context:
space:
mode:
authorGravatar atmos4 <atmos4@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-09-23 01:44:37 +0000
committerGravatar atmos4 <atmos4@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-09-23 01:44:37 +0000
commit7ad13f49b4ee4a297472ee17de694576eb503553 (patch)
tree113813166a90024e15ff79765806eb58fbcaa7a1 /mp3lib
parent1a83bec0f75a968fc7d09728d0c52da93c694a07 (diff)
Fix for mp3 decoding on alpha/64bit platforms wupposed by Bob McElrath.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1942 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mp3lib')
-rw-r--r--mp3lib/decod386.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/mp3lib/decod386.c b/mp3lib/decod386.c
index f5ca8940c0..7cf9f44540 100644
--- a/mp3lib/decod386.c
+++ b/mp3lib/decod386.c
@@ -56,7 +56,7 @@
/* sizeof(int) == 4 */
#define WRITE_SAMPLE(samples,sum,clip) { \
- double dtemp; long v; \
+ double dtemp; int v; \
dtemp = ((((65536.0 * 65536.0 * 16)+(65536.0 * 0.5))* 65536.0)) + (sum);\
v = (((int *)&dtemp)[MANTISSA_OFFSET] - 0x80000000); \
if( v > 32767) { *(samples) = 0x7fff; (clip)++; } \
@@ -150,11 +150,13 @@ static int synth_1to1_r(real *bandPtr,int channel,unsigned char *out,int *pnt)
synth_func_t synth_func;
#ifdef HAVE_MMX
-int synth_1to1_MMX( real *bandPtr,int channel,short * samples)
+int synth_1to1_MMX( real *bandPtr ,int channel,short * samples)
{
- static short buffs[2][2][0x110];
- static int bo = 1;
- synth_1to1_MMX_s(bandPtr, channel, samples, (short *) buffs, &bo);
+ real *mybandPtr __attribute__((aligned(16))) = bandPtr;
+ short *mysamples __attribute__((aligned(16))) = samples;
+ static short buffs[2][2][0x110] __attribute__((aligned(16)));
+ static int bo __attribute__((aligned(16))) = 1;
+ synth_1to1_MMX_s(mybandPtr, channel, mysamples, (short *) buffs, &bo);
return 0;
}
#endif