From 4907d3752ec580ced202dfa37e9616298547cbd0 Mon Sep 17 00:00:00 2001
From: Jean-Marc Valin <jean-marc.valin@octasic.com>
Date: Tue, 10 May 2011 15:57:33 -0400
Subject: [PATCH] test_opus.c now checks the sampling rate

---
 src/test_opus.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/test_opus.c b/src/test_opus.c
index 797c872bf..acd61b09d 100644
--- a/src/test_opus.c
+++ b/src/test_opus.c
@@ -109,6 +109,13 @@ int main(int argc, char *argv[])
    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: */
-- 
GitLab