Miscellaneous fixes under Steve's direction.
This commit is contained in:
parent
62e85640da
commit
00fc8205da
2 changed files with 16 additions and 6 deletions
15
src/sl.h
15
src/sl.h
|
@ -24,6 +24,9 @@ typedef unsigned short Ushort ;
|
|||
|
||||
#define SL_DEFAULT_SAMPLING_RATE 11025
|
||||
|
||||
/* Set if the next slScheduler::update will die */
|
||||
extern char *__slPendingError ;
|
||||
|
||||
class slSample ;
|
||||
class slSamplePlayer ;
|
||||
class slEnvelope ;
|
||||
|
@ -165,9 +168,9 @@ public:
|
|||
{
|
||||
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 ;
|
||||
|
@ -329,9 +332,9 @@ public:
|
|||
{
|
||||
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 ;
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#include "sl.h"
|
||||
|
||||
slScheduler *slScheduler::current = NULL ;
|
||||
char *__slPendingError = NULL ;
|
||||
|
||||
void slScheduler::init ()
|
||||
{
|
||||
|
@ -122,6 +123,12 @@ void slScheduler::realUpdate ( int dump_first )
|
|||
if ( not_working () )
|
||||
return ;
|
||||
|
||||
if ( __slPendingError != NULL )
|
||||
{
|
||||
fprintf ( stderr, __slPendingError ) ;
|
||||
exit ( 1 ) ;
|
||||
}
|
||||
|
||||
while ( secondsUsed() <= safety_margin )
|
||||
{
|
||||
slSamplePlayer *psp [ 3 ] ;
|
||||
|
|
Loading…
Reference in a new issue