#define SL_DEFAULT_SAMPLING_RATE 11025
+/* Set if the next slScheduler::update will die */
+extern char *__slPendingError ;
+
class slSample ;
class slSamplePlayer ;
class slEnvelope ;
void play ( void *buffer, size_t length ) { write ( buffer, length ) ; }
+ int working () { return !error ; }
int not_working () { return error ; }
int getBps () { return bps ; }
{
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 ;