freebsd-ports/multimedia/jahshaka/files/patch-jah_libraries_jahaudio_alaw.c
Pav Lucistnik 206ef322e1 Jahshaka is a video and film compositing, editing and special fx system
that uses OpenGL & OpenML hardware rendering to give operators real time
interactivity. The system is cross platform, and also includes full CG,
paint and image processing modules.

PR:		ports/85838
Submitted by:	Igor Pokrovsky <ip@doom.homeunix.org>
2005-09-18 18:20:48 +00:00

26 lines
969 B
C

--- jah/libraries/jahaudio/alaw.c.orig
+++ jah/libraries/jahaudio/alaw.c
@@ -521,9 +521,9 @@
{ while (count)
{ count -- ;
if (ptr [count] >= 0)
- buffer [count] = alaw_encode [(lrintf (normfact * ptr [count])) / 16] ;
+ buffer [count] = alaw_encode [(int)((lrintf (normfact * ptr [count])) / 16)] ;
else
- buffer [count] = 0x7F & alaw_encode [(lrintf (normfact * ptr [count])) / -16] ;
+ buffer [count] = 0x7F & alaw_encode [(int)((lrintf (normfact * ptr [count])) / -16)] ;
} ;
} /* f2alaw_array */
@@ -532,9 +532,9 @@
{ while (count)
{ count -- ;
if (ptr [count] >= 0)
- buffer [count] = alaw_encode [(lrint (normfact * ptr [count])) / 16] ;
+ buffer [count] = alaw_encode [(int)((lrint (normfact * ptr [count])) / 16)] ;
else
- buffer [count] = 0x7F & alaw_encode [(lrint (normfact * ptr [count])) / -16] ;
+ buffer [count] = 0x7F & alaw_encode [(int)((lrint (normfact * ptr [count])) / -16)] ;
} ;
} /* d2alaw_array */