shithub: opus

Download patch

ref: 4907d3752ec580ced202dfa37e9616298547cbd0
parent: a11795c47e16945b1f07a87a4a910c98d000d86c
author: Jean-Marc Valin <[email protected]>
date: Tue May 10 11:57:33 EDT 2011

test_opus.c now checks the sampling rate

--- a/src/test_opus.c
+++ b/src/test_opus.c
@@ -109,6 +109,13 @@
    channels = atoi(argv[3]);
    bitrate_bps = atoi(argv[4]);
 
+   if (sampling_rate != 8000 && sampling_rate != 12000 && sampling_rate != 16000
+           && sampling_rate != 24000 && sampling_rate != 48000)
+   {
+       fprintf(stderr, "Supported sampling rates are 8000, 12000, 16000, "
+               "24000 and 48000.\n");
+       return 1;
+   }
    frame_size = sampling_rate/50;
 
    /* defaults: */