Re-organizing ACM tests

The ACM tests needed re-writing, because all tests were not individual gtests, and the result was difficult to interpret.

While doing the re-write, I discovered a bug related to 48 kHz CNG. We can't have the 48 kHz CNG active at the moment. The bug is fixed in this CL.

I also needed to rewrite parts of the VAD/DTX implementation, so that the status of VAD and DTX (enabled or not) is propagated back from the function SetVAD().

BUG=issue2173
R=minyue@webrtc.org, turaj@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/1961004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4625 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/webrtc/modules/audio_coding/neteq/codec_db.c b/webrtc/modules/audio_coding/neteq/codec_db.c
index 8d8389a..bb34f5e 100644
--- a/webrtc/modules/audio_coding/neteq/codec_db.c
+++ b/webrtc/modules/audio_coding/neteq/codec_db.c
@@ -217,6 +217,15 @@
         /* find the appropriate insert position in CNG payload vector */
         switch (codec_fs)
         {
+            case 8000:
+            CNGpos = 0;
+            /*
+             * The 8 kHz CNG payload type is the one associated with the regular codec DB
+             * should override any other setting.
+             * Overwrite if this isn't the first CNG
+             */
+            overwriteCNGcodec = !insertCNGcodec;
+            break;
 #ifdef NETEQ_WIDEBAND
             case 16000:
             CNGpos = 1;
@@ -232,15 +241,9 @@
             CNGpos = 3;
             break;
 #endif
-            default: /* 8000 Hz case */
-                CNGpos = 0;
-                /*
-                 * The 8 kHz CNG payload type is the one associated with the regular codec DB
-                 * should override any other setting.
-                 * Overwrite if this isn't the first CNG
-                 */
-                overwriteCNGcodec = !insertCNGcodec;
-                break;
+            default:
+            /* If we get to this point, the inserted codec is not supported */
+            return CODEC_DB_UNSUPPORTED_CODEC;
         }
 
         /* insert CNG payload type */