summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorcwolf <cwolf@xiph.org>2001-09-19 01:17:00 +0000
committercwolf <cwolf@xiph.org>2001-09-19 01:17:00 +0000
commit787e90e3e52bca74192da38a4f8ed17947628bd3 (patch)
tree84f6a0d3de5801c0130da0dcbe6985e9dcf14920 /examples
parent7592b44c3db55db3153a720c4c6808dc6fc59649 (diff)
downloadlibvorbis-git-787e90e3e52bca74192da38a4f8ed17947628bd3.tar.gz
allow raw pcm files
svn path=/trunk/vorbis/; revision=2064
Diffstat (limited to 'examples')
-rw-r--r--examples/encoder_example.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/examples/encoder_example.c b/examples/encoder_example.c
index 40d4e36d..59d27c2b 100644
--- a/examples/encoder_example.c
+++ b/examples/encoder_example.c
@@ -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 @@ int main(){
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);
@@ -88,18 +88,6 @@ int main(){
}
}
- 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 */