class slScheduler ;
class slDSP ;
+extern char *__slPendingError ;
+
class slDSP
{
private:
void play ( void *buffer, size_t length ) { write ( buffer, length ) ; }
+ int working () { return !error ; }
int not_working () { return error ; }
int getBps () { return bps ; }
~slSample ()
{
- if ( ref_count != 0 )
- {
- fprintf ( stderr,
- "slSample: FATAL ERROR - Application deleted a sample while it was playing.\n" ) ;
- exit ( 1 ) ;
- }
+ if ( ref_count != 0 && __slPendingError == NULL )
+ __slPendingError =
+ "slSample: FATAL ERROR - Application deleted a sample while it was playing.\n" ;
delete buffer ;
}
~slEnvelope ()
{
- if ( ref_count != 0 )
- {
- fprintf ( stderr,
- "slEnvelope: FATAL ERROR - Application deleted an envelope while it was playing.\n" ) ;
- exit ( 1 ) ;
- }
+ if ( ref_count != 0 && __slPendingError == NULL )
+ __slPendingError =
+ "slEnvelope: FATAL ERROR - Application deleted an envelope while it was playing.\n" ;
delete time ;
delete value ;