Update of /cvsroot/plib/plib/src/sl
In directory usw-pr-cvs1:/tmp/cvs-serv22621
Modified Files:
slDSP.cxx
Log Message:
Erik Hofman: Modifications for IRIX compatibility
Index: slDSP.cxx
===================================================================
RCS file: /cvsroot/plib/plib/src/sl/slDSP.cxx,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- slDSP.cxx 19 Apr 2002 23:28:23 -0000 1.16
+++ slDSP.cxx 1 Jul 2002 01:23:49 -0000 1.17
@@ -636,36 +636,34 @@
return;
}
- init_bytes = 1024 * 32;
- if (_bps == 8) init_bytes /= 2;
- if (_stereo) init_bytes /= 2;
+ init_bytes = 1024 * 16;
- config = alNewConfig();
- alSetChannels(config, _stereo ? AL_STEREO : AL_MONO);
- alSetWidth(config, _bps == 8 ? AL_SAMPLE_8 : AL_SAMPLE_16);
[...109 lines suppressed...]
return (float) samples_remain / (float) rate ;
}
@@ -742,11 +740,14 @@
float slDSP::secondsUsed ()
{
int samples_used;
-
+
if ( error )
return 0.0f ;
- samples_used = alGetFilled(port);
+ samples_used = ALgetfilled(port);
+
+ if ( stereo ) samples_used /= 2 ;
+ if ( bps == 16 ) samples_used /= 2 ;
return (float) samples_used / (float) rate ;
}
|