********************************************************************
function: simple example encoder
- last mod: $Id: encoder_example.c,v 1.26 2001/09/17 01:33:07 cwolf Exp $
+ last mod: $Id: encoder_example.c,v 1.27 2001/09/19 01:17:00 cwolf Exp $
********************************************************************/
example, after all. */
readbuffer[0] = '\0';
- for (i=0, founddata=0; i<40 && ! feof(stdin) && ! ferror(stdin); i++)
+ for (i=0, founddata=0; i<30 && ! feof(stdin) && ! ferror(stdin); i++)
{
fread(readbuffer,1,2,stdin);
}
}
- if ( feof(stdin) || ferror(stdin) )
- {
- (void)fprintf(stderr, "Error: Input WAV too short, or corrupt.\n");
- return(1);
- }
-
- if ( ! founddata )
- {
- (void)fprintf(stderr, "Error: Can't find \"data\" chunk in WAV input.\n");
- return(1);
- }
-
/********** Encode setup ************/
/* choose an encoding mode */