[Plib-cvs] plib/examples/src/sl mod_demo.cxx,1.7,1.8
Brought to you by:
sjbaker
From: Steve B. <sj...@us...> - 2005-02-01 01:14:26
|
Update of /cvsroot/plib/plib/examples/src/sl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28083/plib/examples/src/sl Modified Files: mod_demo.cxx Log Message: pwWindows.cxx had an error that cause the window position to be interpreted as the position of the rendered area - not the position of the window decorations. ssgaFire had a dependancy on the scale of the model. If you treat an OpenGL unit as 1meter, you got good results - but if you treat an OpenGL unit as an inch or a mile, the fire looks crap. Minor tweaks to exposer and the mod-player demo. Index: mod_demo.cxx =================================================================== RCS file: /cvsroot/plib/plib/examples/src/sl/mod_demo.cxx,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- mod_demo.cxx 1 Sep 2002 12:04:51 -0000 1.7 +++ mod_demo.cxx 1 Feb 2005 01:14:12 -0000 1.8 @@ -33,12 +33,19 @@ slScheduler sched ( 44100 ) ; +void callback ( slSample *, slEvent event, int ) +{ + if ( event == SL_EVENT_COMPLETE ) + exit ( 0 ) ; +} + + int main ( int argc, char **argv ) { sched . setSafetyMargin ( 0.5 ) ; if ( argc == 2 ) - sched . loopMusic ( argv[1] ) ; + sched . playMusic ( argv[1], 1, SL_SAMPLE_ABORT, 0, callback ) ; else sched . loopMusic ( "tuxr.mod" ) ; |