[xiph-cvs] cvs commit: vorbis/examples encoder_example.c

Chris Wolf cwolf at xiph.org
Tue Sep 18 18:17:01 PDT 2001



cwolf       01/09/18 18:17:01

  Modified:    examples encoder_example.c
  Log:
  allow raw pcm files

Revision  Changes    Path
1.27      +2 -14     vorbis/examples/encoder_example.c

Index: encoder_example.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/examples/encoder_example.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- encoder_example.c	2001/09/17 01:33:07	1.26
+++ encoder_example.c	2001/09/19 01:17:00	1.27
@@ -11,7 +11,7 @@
  ********************************************************************
 
  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 $
 
  ********************************************************************/
 
@@ -77,7 +77,7 @@
      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);
 
@@ -86,18 +86,6 @@
       founddata = 1;
       fread(readbuffer,1,6,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 ************/

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list