summaryrefslogtreecommitdiff
path: root/package/esound/patches/patch-esd_c
blob: 2af302a63dc7735593fedd1951bb83bbcc67fb88 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
$Id$

 cast to double, to avoid sinf, patch from Sven Gugges

--- esound-0.2.41.orig/esd.c	2008-11-18 21:35:19.000000000 +0100
+++ esound-0.2.41/esd.c	2011-01-14 23:15:33.000000000 +0100
@@ -134,14 +134,14 @@ void set_audio_buffer( void *buf, esd_fo
     {
     case ESD_BITS8:
 	for ( i = 0 ; i < length ; i+=2 ) {
-	    sample = sin( (float)(i+offset) * kf );
+	    sample = sin( (double)(i+offset) * kf );
 	    uc_buf[i] = 127 + magl * sample;
 	    uc_buf[i+1] = 127 + magr * sample;
 	}
 	break;
     case ESD_BITS16:	/* assume same endianness */
 	for ( i = 0 ; i < length ; i+=2 ) {
-	    sample = sin( (float)(i+offset) * kf );
+	    sample = sin( (double)(i+offset) * kf );
 	    ss_buf[i] = magl * sample;
 	    ss_buf[i+1] = magr * sample;
 	}