From: drowe67 Date: Thu, 7 Mar 2013 06:28:20 +0000 (+0000) Subject: extend spare bit to 1600 bit/s X-Git-Url: http://git.whiteaudio.com/gitweb/?a=commitdiff_plain;h=740e6fc256170c22ae2c946f8ac8145cce807f83;p=freetel-svn-tracking.git extend spare bit to 1600 bit/s git-svn-id: https://svn.code.sf.net/p/freetel/code@1192 01035d8c-6547-0410-b346-abe4f91aad63 --- diff --git a/codec2-dev/src/codec2.c b/codec2-dev/src/codec2.c index 9a64c7e4..380cf430 100644 --- a/codec2-dev/src/codec2.c +++ b/codec2-dev/src/codec2.c @@ -1217,18 +1217,24 @@ void CODEC2_WIN32SUPPORT codec2_set_lpc_post_filter(struct CODEC2 *c2, int enabl /* Allows optional stealing of one of the voicing bits for use as a - spare bit, only 1400 bit/s supported for now. Experimental method - of sending voice/data frames for FreeDV. + spare bit, only 1400 & 1600 bit/s supported for now. Experimental + method of sending voice/data frames for FreeDV. */ int CODEC2_WIN32SUPPORT codec2_get_spare_bit_index(struct CODEC2 *c2) { assert(c2 != NULL); - if (c2->mode != CODEC2_MODE_1400) - return -1; + switch(c2->mode) { + case CODEC2_MODE_1400: + return 10; // bit 10 (11th bit) is v2 (third voicing bit) + break; + case CODEC2_MODE_1600: + return 15; // bit 15 (16th bit) is v2 (third voicing bit) + break; + } - return 10; // bit 10 (11th bit) is v2 (third voicing bit) + return -1; } /*