Update of /cvsroot/plib/plib/src/sl
In directory usw-pr-cvs1:/tmp/cvs-serv14290
Modified Files:
slSample.cxx
Log Message:
Fixed 16-bit conversion in WAVE loader.
Index: slSample.cxx
===================================================================
RCS file: /cvsroot/plib/plib/src/sl/slSample.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- slSample.cxx 7 Nov 2001 23:51:09 -0000 1.4
+++ slSample.cxx 1 Mar 2002 17:51:53 -0000 1.5
@@ -404,11 +404,6 @@
if ( getBps () == 16 )
{
- Ushort *b = (Ushort*) buffer ;
-
- for ( int i = 0 ; i < length/2 ; i++ )
- b [ i ] = (Ushort) ( (int)((short) b [ i ]) + 32768 ) ;
-
changeToUnsigned () ;
}
@@ -416,7 +411,9 @@
return SL_TRUE ;
}
}
-
+
+ ulSetError ( UL_WARNING, "slSample: Premature EOF in '%s'.", fname ) ;
+
fclose ( fd ) ;
return SL_FALSE ;
}
|