#define SL_DEFAULT_SAMPLING_RATE 11025
+/* Set if the next slScheduler::update will die */
+extern char *__slPendingError ;
+
class slSample ;
class slSamplePlayer ;
class slEnvelope ;
{
if ( ref_count != 0 )
{
- fprintf ( stderr,
- "slSample: FATAL ERROR - Application deleted a sample while it was playing.\n" ) ;
- exit ( 1 ) ;
+ if ( __slPendingError == NULL )
+ __slPendingError =
+ "slXXXX: FATAL ERROR - Application deleted a sample while it was playing.\n" ;
}
delete buffer ;
{
if ( ref_count != 0 )
{
- fprintf ( stderr,
- "slEnvelope: FATAL ERROR - Application deleted an envelope while it was playing.\n" ) ;
- exit ( 1 ) ;
+ if ( __slPendingError == NULL )
+ __slPendingError =
+ "slXXXX: FATAL ERROR - Application deleted an envelope while it was playing.\n" ;
}
delete time ;
#include "sl.h"
slScheduler *slScheduler::current = NULL ;
+char *__slPendingError = NULL ;
void slScheduler::init ()
{
if ( not_working () )
return ;
+ if ( __slPendingError != NULL )
+ {
+ fprintf ( stderr, __slPendingError ) ;
+ exit ( 1 ) ;
+ }
+
while ( secondsUsed() <= safety_margin )
{
slSamplePlayer *psp [ 3 ] ;