[xiph-cvs] cvs commit: vorbis-tools/oggenc audio.c

Michael Smith msmith at xiph.org
Sun Nov 5 17:45:24 PST 2000



msmith      00/11/05 17:45:24

  Modified:    oggenc   audio.c
  Log:
  Don't restrict things to 44.1kHz. Warn about not being tuned for other sample
  rates, though.

Revision  Changes    Path
1.3       +5 -2      vorbis-tools/oggenc/audio.c

Index: audio.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis-tools/oggenc/audio.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- audio.c	2000/11/04 10:04:58	1.2
+++ audio.c	2000/11/06 01:45:23	1.3
@@ -115,13 +115,16 @@
 
         if( format.format == 1 &&
                 (format.channels == 2 || format.channels == 1) &&
-		format.samplerate == 44100 &&
                 format.align == format.channels*2 && /* We could deal with this one pretty easily */
                 format.samplesize == 16)
         {
+		if(format.samplerate != 44100)
+			fprintf(stderr, "Warning: Vorbis is currently not tuned for input\n"
+							" at other than 44.1kHz. Quality may be somewhat\n"
+							" degraded.\n");
                 /* OK, good - we have the one supported format,
                    now we want to find the size of the file */
-		opt->rate = 44100;
+		opt->rate = format.samplerate;
                 opt->channels = format.channels;
                 if(opt->channels ==2)
                         opt->read_samples = wav_read_stereo;

--- >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