From jwc@chilton.com Wed Feb 14 00:56:13 1996
Received: from chilton.com (chilton.com [206.205.206.2]) by mail.cs.tu-berlin.de (8.6.12/8.6.12) with ESMTP id AAA07378 for <jutta@cs.tu-berlin.de>; Wed, 14 Feb 1996 00:56:04 +0100
Received: (from jwc@localhost) by chilton.com (8.6.11/8.6.11) id SAA28072; Tue, 13 Feb 1996 18:55:58 -0500
Date: Tue, 13 Feb 1996 18:55:57 -0500 (EST)
From: Jeff CHILTON <jwc@chilton.com>
To: Jutta Degener <jutta@cs.tu-berlin.de>
Subject: Current state of GSM library changes
Message-ID: <Pine.NEB.3.91.960213185259.28024A-100000@chilton.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Status: RO

*** ./inc/private.h.00	Wed Feb  7 15:17:14 1996
--- ./inc/private.h	Sun Feb 11 15:38:01 1996
***************
*** 34,39 ****
--- 34,47 ----
  
  	char		verbose;	/* only used if !NDEBUG		*/
  	char		fast;		/* only used if FAST		*/
+ 	char		wav_fmt;	/* only used if WAV49		*/
+ 
+ #if WAV49
+ 
+ 	char		even_frame;	/* if on even-numbered frame	*/
+ 	char		chain;		/* half-byte to carry forward	*/
+ 
+ #endif
  
  };
  
*** ./inc/gsm.h.00	Fri Feb  9 19:40:34 1996
--- ./inc/gsm.h	Fri Feb  9 19:48:33 1996
***************
*** 43,55 ****
  
  #define	GSM_MAGIC	0xD			  	/* 13 kbit/s RPE-LTP */
  
! #define	GSM_PATCHLEVEL	7
  #define	GSM_MINOR	0
  #define	GSM_MAJOR	1
  
  #define	GSM_OPT_VERBOSE	1
  #define	GSM_OPT_FAST	2
  #define	GSM_OPT_LTP_CUT	3
  
  extern gsm  gsm_create 	GSM_P((void));
  extern void gsm_destroy GSM_P((gsm));	
--- 43,56 ----
  
  #define	GSM_MAGIC	0xD			  	/* 13 kbit/s RPE-LTP */
  
! #define	GSM_PATCHLEVEL	8
  #define	GSM_MINOR	0
  #define	GSM_MAJOR	1
  
  #define	GSM_OPT_VERBOSE	1
  #define	GSM_OPT_FAST	2
  #define	GSM_OPT_LTP_CUT	3
+ #define	GSM_OPT_WAV_FMT	4
  
  extern gsm  gsm_create 	GSM_P((void));
  extern void gsm_destroy GSM_P((gsm));	
***************
*** 62,67 ****
--- 63,70 ----
  
  extern int  gsm_explode GSM_P((gsm, gsm_byte   *, gsm_signal *));
  extern void gsm_implode GSM_P((gsm, gsm_signal *, gsm_byte   *));
+ 
+ extern int  gsm_even_frame GSM_P((gsm));
  
  #undef	GSM_P
  
*** ./src/gsm_encode.c.00	Wed Feb  7 15:12:46 1996
--- ./src/gsm_encode.c	Sun Feb 11 15:28:58 1996
***************
*** 103,207 ****
  		xmc[51]		3
  	*/
  
  
- 	*c++ =   ((GSM_MAGIC & 0xF) << 4)		/* 1 */
- 	       | ((LARc[0] >> 2) & 0xF);
- 	*c++ =   ((LARc[0] & 0x3) << 6)
- 	       | (LARc[1] & 0x3F);
- 	*c++ =   ((LARc[2] & 0x1F) << 3)
- 	       | ((LARc[3] >> 2) & 0x7);
- 	*c++ =   ((LARc[3] & 0x3) << 6)
- 	       | ((LARc[4] & 0xF) << 2)
- 	       | ((LARc[5] >> 2) & 0x3);
- 	*c++ =   ((LARc[5] & 0x3) << 6)
- 	       | ((LARc[6] & 0x7) << 3)
- 	       | (LARc[7] & 0x7);
- 	*c++ =   ((Nc[0] & 0x7F) << 1)
- 	       | ((bc[0] >> 1) & 0x1);
- 	*c++ =   ((bc[0] & 0x1) << 7)
- 	       | ((Mc[0] & 0x3) << 5)
- 	       | ((xmaxc[0] >> 1) & 0x1F);
- 	*c++ =   ((xmaxc[0] & 0x1) << 7)
- 	       | ((xmc[0] & 0x7) << 4)
- 	       | ((xmc[1] & 0x7) << 1)
- 	       | ((xmc[2] >> 2) & 0x1);
- 	*c++ =   ((xmc[2] & 0x3) << 6)
- 	       | ((xmc[3] & 0x7) << 3)
- 	       | (xmc[4] & 0x7);
- 	*c++ =   ((xmc[5] & 0x7) << 5)			/* 10 */
- 	       | ((xmc[6] & 0x7) << 2)
- 	       | ((xmc[7] >> 1) & 0x3);
- 	*c++ =   ((xmc[7] & 0x1) << 7)
- 	       | ((xmc[8] & 0x7) << 4)
- 	       | ((xmc[9] & 0x7) << 1)
- 	       | ((xmc[10] >> 2) & 0x1);
- 	*c++ =   ((xmc[10] & 0x3) << 6)
- 	       | ((xmc[11] & 0x7) << 3)
- 	       | (xmc[12] & 0x7);
- 	*c++ =   ((Nc[1] & 0x7F) << 1)
- 	       | ((bc[1] >> 1) & 0x1);
- 	*c++ =   ((bc[1] & 0x1) << 7)
- 	       | ((Mc[1] & 0x3) << 5)
- 	       | ((xmaxc[1] >> 1) & 0x1F);
- 	*c++ =   ((xmaxc[1] & 0x1) << 7)
- 	       | ((xmc[13] & 0x7) << 4)
- 	       | ((xmc[14] & 0x7) << 1)
- 	       | ((xmc[15] >> 2) & 0x1);
- 	*c++ =   ((xmc[15] & 0x3) << 6)
- 	       | ((xmc[16] & 0x7) << 3)
- 	       | (xmc[17] & 0x7);
- 	*c++ =   ((xmc[18] & 0x7) << 5)
- 	       | ((xmc[19] & 0x7) << 2)
- 	       | ((xmc[20] >> 1) & 0x3);
- 	*c++ =   ((xmc[20] & 0x1) << 7)
- 	       | ((xmc[21] & 0x7) << 4)
- 	       | ((xmc[22] & 0x7) << 1)
- 	       | ((xmc[23] >> 2) & 0x1);
- 	*c++ =   ((xmc[23] & 0x3) << 6)
- 	       | ((xmc[24] & 0x7) << 3)
- 	       | (xmc[25] & 0x7);
- 	*c++ =   ((Nc[2] & 0x7F) << 1)			/* 20 */
- 	       | ((bc[2] >> 1) & 0x1);
- 	*c++ =   ((bc[2] & 0x1) << 7)
- 	       | ((Mc[2] & 0x3) << 5)
- 	       | ((xmaxc[2] >> 1) & 0x1F);
- 	*c++ =   ((xmaxc[2] & 0x1) << 7)
- 	       | ((xmc[26] & 0x7) << 4)
- 	       | ((xmc[27] & 0x7) << 1)
- 	       | ((xmc[28] >> 2) & 0x1);
- 	*c++ =   ((xmc[28] & 0x3) << 6)
- 	       | ((xmc[29] & 0x7) << 3)
- 	       | (xmc[30] & 0x7);
- 	*c++ =   ((xmc[31] & 0x7) << 5)
- 	       | ((xmc[32] & 0x7) << 2)
- 	       | ((xmc[33] >> 1) & 0x3);
- 	*c++ =   ((xmc[33] & 0x1) << 7)
- 	       | ((xmc[34] & 0x7) << 4)
- 	       | ((xmc[35] & 0x7) << 1)
- 	       | ((xmc[36] >> 2) & 0x1);
- 	*c++ =   ((xmc[36] & 0x3) << 6)
- 	       | ((xmc[37] & 0x7) << 3)
- 	       | (xmc[38] & 0x7);
- 	*c++ =   ((Nc[3] & 0x7F) << 1)
- 	       | ((bc[3] >> 1) & 0x1);
- 	*c++ =   ((bc[3] & 0x1) << 7)
- 	       | ((Mc[3] & 0x3) << 5)
- 	       | ((xmaxc[3] >> 1) & 0x1F);
- 	*c++ =   ((xmaxc[3] & 0x1) << 7)
- 	       | ((xmc[39] & 0x7) << 4)
- 	       | ((xmc[40] & 0x7) << 1)
- 	       | ((xmc[41] >> 2) & 0x1);
- 	*c++ =   ((xmc[41] & 0x3) << 6)			/* 30 */
- 	       | ((xmc[42] & 0x7) << 3)
- 	       | (xmc[43] & 0x7);
- 	*c++ =   ((xmc[44] & 0x7) << 5)
- 	       | ((xmc[45] & 0x7) << 2)
- 	       | ((xmc[46] >> 1) & 0x3);
- 	*c++ =   ((xmc[46] & 0x1) << 7)
- 	       | ((xmc[47] & 0x7) << 4)
- 	       | ((xmc[48] & 0x7) << 1)
- 	       | ((xmc[49] >> 2) & 0x1);
- 	*c++ =   ((xmc[49] & 0x3) << 6)
- 	       | ((xmc[50] & 0x7) << 3)
- 	       | (xmc[51] & 0x7);
  }
--- 103,457 ----
  		xmc[51]		3
  	*/
  
+ #ifdef WAV49
+ 
+ 	if (s->wav_fmt)
+ 	{
+ 		s->even_frame = !s->even_frame;
+ 		if (s->even_frame)
+ 		{
+ 			unsigned short sr;
+ 
+ 			sr = 0;
+ 			sr = sr >> 6 | LARc[0] << 10;
+ 			sr = sr >> 6 | LARc[1] << 10;
+ 			*c++ = sr >> 4;
+ 			sr = sr >> 5 | LARc[2] << 11;
+ 			*c++ = sr >> 7;
+ 			sr = sr >> 5 | LARc[3] << 11;
+ 			sr = sr >> 4 | LARc[4] << 12;
+ 			*c++ = sr >> 6;
+ 			sr = sr >> 4 | LARc[5] << 12;
+ 			sr = sr >> 3 | LARc[6] << 13;
+ 			*c++ = sr >> 7;
+ 			sr = sr >> 3 | LARc[7] << 13;
+ 			sr = sr >> 7 | Nc[0] << 9;
+ 			*c++ = sr >> 5;
+ 			sr = sr >> 2 | bc[0] << 14;
+ 			sr = sr >> 2 | Mc[0] << 14;
+ 			sr = sr >> 6 | xmaxc[0] << 10;
+ 			*c++ = sr >> 3;
+ 			sr = sr >> 3 | xmc[0] << 13;
+ 			*c++ = sr >> 8;
+ 			sr = sr >> 3 | xmc[1] << 13;
+ 			sr = sr >> 3 | xmc[2] << 13;
+ 			sr = sr >> 3 | xmc[3] << 13;
+ 			*c++ = sr >> 7;
+ 			sr = sr >> 3 | xmc[4] << 13;
+ 			sr = sr >> 3 | xmc[5] << 13;
+ 			sr = sr >> 3 | xmc[6] << 13;
+ 			*c++ = sr >> 6;
+ 			sr = sr >> 3 | xmc[7] << 13;
+ 			sr = sr >> 3 | xmc[8] << 13;
+ 			*c++ = sr >> 8;
+ 			sr = sr >> 3 | xmc[9] << 13;
+ 			sr = sr >> 3 | xmc[10] << 13;
+ 			sr = sr >> 3 | xmc[11] << 13;
+ 			*c++ = sr >> 7;
+ 			sr = sr >> 3 | xmc[12] << 13;
+ 			sr = sr >> 7 | Nc[1] << 9;
+ 			*c++ = sr >> 5;
+ 			sr = sr >> 2 | bc[1] << 14;
+ 			sr = sr >> 2 | Mc[1] << 14;
+ 			sr = sr >> 6 | xmaxc[1] << 10;
+ 			*c++ = sr >> 3;
+ 			sr = sr >> 3 | xmc[13] << 13;
+ 			*c++ = sr >> 8;
+ 			sr = sr >> 3 | xmc[14] << 13;
+ 			sr = sr >> 3 | xmc[15] << 13;
+ 			sr = sr >> 3 | xmc[16] << 13;
+ 			*c++ = sr >> 7;
+ 			sr = sr >> 3 | xmc[17] << 13;
+ 			sr = sr >> 3 | xmc[18] << 13;
+ 			sr = sr >> 3 | xmc[19] << 13;
+ 			*c++ = sr >> 6;
+ 			sr = sr >> 3 | xmc[20] << 13;
+ 			sr = sr >> 3 | xmc[21] << 13;
+ 			*c++ = sr >> 8;
+ 			sr = sr >> 3 | xmc[22] << 13;
+ 			sr = sr >> 3 | xmc[23] << 13;
+ 			sr = sr >> 3 | xmc[24] << 13;
+ 			*c++ = sr >> 7;
+ 			sr = sr >> 3 | xmc[25] << 13;
+ 			sr = sr >> 7 | Nc[2] << 9;
+ 			*c++ = sr >> 5;
+ 			sr = sr >> 2 | bc[2] << 14;
+ 			sr = sr >> 2 | Mc[2] << 14;
+ 			sr = sr >> 6 | xmaxc[2] << 10;
+ 			*c++ = sr >> 3;
+ 			sr = sr >> 3 | xmc[26] << 13;
+ 			*c++ = sr >> 8;
+ 			sr = sr >> 3 | xmc[27] << 13;
+ 			sr = sr >> 3 | xmc[28] << 13;
+ 			sr = sr >> 3 | xmc[29] << 13;
+ 			*c++ = sr >> 7;
+ 			sr = sr >> 3 | xmc[30] << 13;
+ 			sr = sr >> 3 | xmc[31] << 13;
+ 			sr = sr >> 3 | xmc[32] << 13;
+ 			*c++ = sr >> 6;
+ 			sr = sr >> 3 | xmc[33] << 13;
+ 			sr = sr >> 3 | xmc[34] << 13;
+ 			*c++ = sr >> 8;
+ 			sr = sr >> 3 | xmc[35] << 13;
+ 			sr = sr >> 3 | xmc[36] << 13;
+ 			sr = sr >> 3 | xmc[37] << 13;
+ 			*c++ = sr >> 7;
+ 			sr = sr >> 3 | xmc[38] << 13;
+ 			sr = sr >> 7 | Nc[3] << 9;
+ 			*c++ = sr >> 5;
+ 			sr = sr >> 2 | bc[3] << 14;
+ 			sr = sr >> 2 | Mc[3] << 14;
+ 			sr = sr >> 6 | xmaxc[3] << 10;
+ 			*c++ = sr >> 3;
+ 			sr = sr >> 3 | xmc[39] << 13;
+ 			*c++ = sr >> 8;
+ 			sr = sr >> 3 | xmc[40] << 13;
+ 			sr = sr >> 3 | xmc[41] << 13;
+ 			sr = sr >> 3 | xmc[42] << 13;
+ 			*c++ = sr >> 7;
+ 			sr = sr >> 3 | xmc[43] << 13;
+ 			sr = sr >> 3 | xmc[44] << 13;
+ 			sr = sr >> 3 | xmc[45] << 13;
+ 			*c++ = sr >> 6;
+ 			sr = sr >> 3 | xmc[46] << 13;
+ 			sr = sr >> 3 | xmc[47] << 13;
+ 			*c++ = sr >> 8;
+ 			sr = sr >> 3 | xmc[48] << 13;
+ 			sr = sr >> 3 | xmc[49] << 13;
+ 			sr = sr >> 3 | xmc[50] << 13;
+ 			*c++ = sr >> 7;
+ 			sr = sr >> 3 | xmc[51] << 13;
+ 			sr = sr >> 4 | 0 << 12;
+ 			*c++ = sr >> 8;
+ 			s->chain = *(c - 1);
+ 		}
+ 		else
+ 		{
+ 			unsigned short sr;
+ 
+ 			sr = 0;
+ 			sr = sr >> 4 | s->chain << 12;
+ 			sr = sr >> 6 | LARc[0] << 10;
+ 			*c++ = sr >> 6;
+ 			sr = sr >> 6 | LARc[1] << 10;
+ 			*c++ = sr >> 8;
+ 			sr = sr >> 5 | LARc[2] << 11;
+ 			sr = sr >> 5 | LARc[3] << 11;
+ 			*c++ = sr >> 6;
+ 			sr = sr >> 4 | LARc[4] << 12;
+ 			sr = sr >> 4 | LARc[5] << 12;
+ 			*c++ = sr >> 6;
+ 			sr = sr >> 3 | LARc[6] << 13;
+ 			sr = sr >> 3 | LARc[7] << 13;
+ 			*c++ = sr >> 8;
+ 			sr = sr >> 7 | Nc[0] << 9;
+ 			sr = sr >> 2 | bc[0] << 14;
+ 			*c++ = sr >> 7;
+ 			sr = sr >> 2 | Mc[0] << 14;
+ 			sr = sr >> 6 | xmaxc[0] << 10;
+ 			*c++ = sr >> 7;
+ 			sr = sr >> 3 | xmc[0] << 13;
+ 			sr = sr >> 3 | xmc[1] << 13;
+ 			sr = sr >> 3 | xmc[2] << 13;
+ 			*c++ = sr >> 6;
+ 			sr = sr >> 3 | xmc[3] << 13;
+ 			sr = sr >> 3 | xmc[4] << 13;
+ 			*c++ = sr >> 8;
+ 			sr = sr >> 3 | xmc[5] << 13;
+ 			sr = sr >> 3 | xmc[6] << 13;
+ 			sr = sr >> 3 | xmc[7] << 13;
+ 			*c++ = sr >> 7;
+ 			sr = sr >> 3 | xmc[8] << 13;
+ 			sr = sr >> 3 | xmc[9] << 13;
+ 			sr = sr >> 3 | xmc[10] << 13;
+ 			*c++ = sr >> 6;
+ 			sr = sr >> 3 | xmc[11] << 13;
+ 			sr = sr >> 3 | xmc[12] << 13;
+ 			*c++ = sr >> 8;
+ 			sr = sr >> 7 | Nc[1] << 9;
+ 			sr = sr >> 2 | bc[1] << 14;
+ 			*c++ = sr >> 7;
+ 			sr = sr >> 2 | Mc[1] << 14;
+ 			sr = sr >> 6 | xmaxc[1] << 10;
+ 			*c++ = sr >> 7;
+ 			sr = sr >> 3 | xmc[13] << 13;
+ 			sr = sr >> 3 | xmc[14] << 13;
+ 			sr = sr >> 3 | xmc[15] << 13;
+ 			*c++ = sr >> 6;
+ 			sr = sr >> 3 | xmc[16] << 13;
+ 			sr = sr >> 3 | xmc[17] << 13;
+ 			*c++ = sr >> 8;
+ 			sr = sr >> 3 | xmc[18] << 13;
+ 			sr = sr >> 3 | xmc[19] << 13;
+ 			sr = sr >> 3 | xmc[20] << 13;
+ 			*c++ = sr >> 7;
+ 			sr = sr >> 3 | xmc[21] << 13;
+ 			sr = sr >> 3 | xmc[22] << 13;
+ 			sr = sr >> 3 | xmc[23] << 13;
+ 			*c++ = sr >> 6;
+ 			sr = sr >> 3 | xmc[24] << 13;
+ 			sr = sr >> 3 | xmc[25] << 13;
+ 			*c++ = sr >> 8;
+ 			sr = sr >> 7 | Nc[2] << 9;
+ 			sr = sr >> 2 | bc[2] << 14;
+ 			*c++ = sr >> 7;
+ 			sr = sr >> 2 | Mc[2] << 14;
+ 			sr = sr >> 6 | xmaxc[2] << 10;
+ 			*c++ = sr >> 7;
+ 			sr = sr >> 3 | xmc[26] << 13;
+ 			sr = sr >> 3 | xmc[27] << 13;
+ 			sr = sr >> 3 | xmc[28] << 13;
+ 			*c++ = sr >> 6;
+ 			sr = sr >> 3 | xmc[29] << 13;
+ 			sr = sr >> 3 | xmc[30] << 13;
+ 			*c++ = sr >> 8;
+ 			sr = sr >> 3 | xmc[31] << 13;
+ 			sr = sr >> 3 | xmc[32] << 13;
+ 			sr = sr >> 3 | xmc[33] << 13;
+ 			*c++ = sr >> 7;
+ 			sr = sr >> 3 | xmc[34] << 13;
+ 			sr = sr >> 3 | xmc[35] << 13;
+ 			sr = sr >> 3 | xmc[36] << 13;
+ 			*c++ = sr >> 6;
+ 			sr = sr >> 3 | xmc[37] << 13;
+ 			sr = sr >> 3 | xmc[38] << 13;
+ 			*c++ = sr >> 8;
+ 			sr = sr >> 7 | Nc[3] << 9;
+ 			sr = sr >> 2 | bc[3] << 14;
+ 			*c++ = sr >> 7;
+ 			sr = sr >> 2 | Mc[3] << 14;
+ 			sr = sr >> 6 | xmaxc[3] << 10;
+ 			*c++ = sr >> 7;
+ 			sr = sr >> 3 | xmc[39] << 13;
+ 			sr = sr >> 3 | xmc[40] << 13;
+ 			sr = sr >> 3 | xmc[41] << 13;
+ 			*c++ = sr >> 6;
+ 			sr = sr >> 3 | xmc[42] << 13;
+ 			sr = sr >> 3 | xmc[43] << 13;
+ 			*c++ = sr >> 8;
+ 			sr = sr >> 3 | xmc[44] << 13;
+ 			sr = sr >> 3 | xmc[45] << 13;
+ 			sr = sr >> 3 | xmc[46] << 13;
+ 			*c++ = sr >> 7;
+ 			sr = sr >> 3 | xmc[47] << 13;
+ 			sr = sr >> 3 | xmc[48] << 13;
+ 			sr = sr >> 3 | xmc[49] << 13;
+ 			*c++ = sr >> 6;
+ 			sr = sr >> 3 | xmc[50] << 13;
+ 			sr = sr >> 3 | xmc[51] << 13;
+ 			*c++ = sr >> 8;
+ 		}
+ 	}
+ 	else
+ 	{
+ 
+ #endif
+ 
+ 		*c++ =   ((GSM_MAGIC & 0xF) << 4)		/* 1 */
+ 		       | ((LARc[0] >> 2) & 0xF);
+ 		*c++ =   ((LARc[0] & 0x3) << 6)
+ 		       | (LARc[1] & 0x3F);
+ 		*c++ =   ((LARc[2] & 0x1F) << 3)
+ 		       | ((LARc[3] >> 2) & 0x7);
+ 		*c++ =   ((LARc[3] & 0x3) << 6)
+ 		       | ((LARc[4] & 0xF) << 2)
+ 		       | ((LARc[5] >> 2) & 0x3);
+ 		*c++ =   ((LARc[5] & 0x3) << 6)
+ 		       | ((LARc[6] & 0x7) << 3)
+ 		       | (LARc[7] & 0x7);
+ 		*c++ =   ((Nc[0] & 0x7F) << 1)
+ 		       | ((bc[0] >> 1) & 0x1);
+ 		*c++ =   ((bc[0] & 0x1) << 7)
+ 		       | ((Mc[0] & 0x3) << 5)
+ 		       | ((xmaxc[0] >> 1) & 0x1F);
+ 		*c++ =   ((xmaxc[0] & 0x1) << 7)
+ 		       | ((xmc[0] & 0x7) << 4)
+ 		       | ((xmc[1] & 0x7) << 1)
+ 		       | ((xmc[2] >> 2) & 0x1);
+ 		*c++ =   ((xmc[2] & 0x3) << 6)
+ 		       | ((xmc[3] & 0x7) << 3)
+ 		       | (xmc[4] & 0x7);
+ 		*c++ =   ((xmc[5] & 0x7) << 5)			/* 10 */
+ 		       | ((xmc[6] & 0x7) << 2)
+ 		       | ((xmc[7] >> 1) & 0x3);
+ 		*c++ =   ((xmc[7] & 0x1) << 7)
+ 		       | ((xmc[8] & 0x7) << 4)
+ 		       | ((xmc[9] & 0x7) << 1)
+ 		       | ((xmc[10] >> 2) & 0x1);
+ 		*c++ =   ((xmc[10] & 0x3) << 6)
+ 		       | ((xmc[11] & 0x7) << 3)
+ 		       | (xmc[12] & 0x7);
+ 		*c++ =   ((Nc[1] & 0x7F) << 1)
+ 		       | ((bc[1] >> 1) & 0x1);
+ 		*c++ =   ((bc[1] & 0x1) << 7)
+ 		       | ((Mc[1] & 0x3) << 5)
+ 		       | ((xmaxc[1] >> 1) & 0x1F);
+ 		*c++ =   ((xmaxc[1] & 0x1) << 7)
+ 		       | ((xmc[13] & 0x7) << 4)
+ 		       | ((xmc[14] & 0x7) << 1)
+ 		       | ((xmc[15] >> 2) & 0x1);
+ 		*c++ =   ((xmc[15] & 0x3) << 6)
+ 		       | ((xmc[16] & 0x7) << 3)
+ 		       | (xmc[17] & 0x7);
+ 		*c++ =   ((xmc[18] & 0x7) << 5)
+ 		       | ((xmc[19] & 0x7) << 2)
+ 		       | ((xmc[20] >> 1) & 0x3);
+ 		*c++ =   ((xmc[20] & 0x1) << 7)
+ 		       | ((xmc[21] & 0x7) << 4)
+ 		       | ((xmc[22] & 0x7) << 1)
+ 		       | ((xmc[23] >> 2) & 0x1);
+ 		*c++ =   ((xmc[23] & 0x3) << 6)
+ 		       | ((xmc[24] & 0x7) << 3)
+ 		       | (xmc[25] & 0x7);
+ 		*c++ =   ((Nc[2] & 0x7F) << 1)			/* 20 */
+ 		       | ((bc[2] >> 1) & 0x1);
+ 		*c++ =   ((bc[2] & 0x1) << 7)
+ 		       | ((Mc[2] & 0x3) << 5)
+ 		       | ((xmaxc[2] >> 1) & 0x1F);
+ 		*c++ =   ((xmaxc[2] & 0x1) << 7)
+ 		       | ((xmc[26] & 0x7) << 4)
+ 		       | ((xmc[27] & 0x7) << 1)
+ 		       | ((xmc[28] >> 2) & 0x1);
+ 		*c++ =   ((xmc[28] & 0x3) << 6)
+ 		       | ((xmc[29] & 0x7) << 3)
+ 		       | (xmc[30] & 0x7);
+ 		*c++ =   ((xmc[31] & 0x7) << 5)
+ 		       | ((xmc[32] & 0x7) << 2)
+ 		       | ((xmc[33] >> 1) & 0x3);
+ 		*c++ =   ((xmc[33] & 0x1) << 7)
+ 		       | ((xmc[34] & 0x7) << 4)
+ 		       | ((xmc[35] & 0x7) << 1)
+ 		       | ((xmc[36] >> 2) & 0x1);
+ 		*c++ =   ((xmc[36] & 0x3) << 6)
+ 		       | ((xmc[37] & 0x7) << 3)
+ 		       | (xmc[38] & 0x7);
+ 		*c++ =   ((Nc[3] & 0x7F) << 1)
+ 		       | ((bc[3] >> 1) & 0x1);
+ 		*c++ =   ((bc[3] & 0x1) << 7)
+ 		       | ((Mc[3] & 0x3) << 5)
+ 		       | ((xmaxc[3] >> 1) & 0x1F);
+ 		*c++ =   ((xmaxc[3] & 0x1) << 7)
+ 		       | ((xmc[39] & 0x7) << 4)
+ 		       | ((xmc[40] & 0x7) << 1)
+ 		       | ((xmc[41] >> 2) & 0x1);
+ 		*c++ =   ((xmc[41] & 0x3) << 6)			/* 30 */
+ 		       | ((xmc[42] & 0x7) << 3)
+ 		       | (xmc[43] & 0x7);
+ 		*c++ =   ((xmc[44] & 0x7) << 5)
+ 		       | ((xmc[45] & 0x7) << 2)
+ 		       | ((xmc[46] >> 1) & 0x3);
+ 		*c++ =   ((xmc[46] & 0x1) << 7)
+ 		       | ((xmc[47] & 0x7) << 4)
+ 		       | ((xmc[48] & 0x7) << 1)
+ 		       | ((xmc[49] >> 2) & 0x1);
+ 		*c++ =   ((xmc[49] & 0x3) << 6)
+ 		       | ((xmc[50] & 0x7) << 3)
+ 		       | (xmc[51] & 0x7);
+ 
+ #ifdef WAV49
+ 
+ 	}
+ 
+ #endif
  
  }
*** ./src/gsm_create.c.00	Wed Feb  7 18:24:25 1996
--- ./src/gsm_create.c	Sun Feb 11 13:39:25 1996
***************
*** 41,45 ****
--- 41,52 ----
  	memset((char *)r, 0, sizeof(*r));
  	r->nrp = 40;
  
+ #ifdef WAV49
+ 
+ 	r->even_frame = 0;
+ 	r->chain = 0;
+ 
+ #endif
+ 
  	return r;
  }
*** ./src/gsm_option.c.00	Wed Feb  7 18:55:37 1996
--- ./src/gsm_option.c	Fri Feb  9 20:06:54 1996
***************
*** 38,45 ****
--- 38,63 ----
  #endif
  		break;
  
+ 	case GSM_OPT_WAV_FMT:
+ 
+ #ifdef WAV49 
+ 		result = r->wav_fmt;
+ 		if (val) r->wav_fmt= !!*val;
+ #endif
+ 		break;
+ 
  	default:
  		break;
  	}
  	return result;
  }
+ 
+ #ifdef WAV49
+ 
+ int
+ gsm_even_frame P1((r), gsm r)
+ {
+     return r->even_frame;
+ }
+ 
+ #endif
*** ./tls/bitter.c.00	Wed Feb  7 16:40:45 1996
--- ./tls/bitter.c	Wed Feb  7 18:19:14 1996
***************
*** 1,10 ****
- /*
-  * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische
-  * Universitaet Berlin.  See the accompanying file "COPYRIGHT" for
-  * details.  THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
-  */
- 
- /*$Header: /home/kbs/jutta/src/gsm/gsm-1.0/tls/RCS/bitter.c,v 1.1 1992/10/28 00:28:39 jutta Exp $*/
  
  /* Generate code to pack a bit array from a name:#bits description */
  
--- 1,3 ----
***************
*** 12,66 ****
  #include	"taste.h"
  #include	"proto.h"
  
  void write_code P2((s_spex, n_spex), struct spex * s_spex, int n_spex)
  {
! 	struct spex	* sp = s_spex;
! 	int		bits = 8;
! 	int		vars;
! 
! 	if (!n_spex) return;
! 
! 	vars = sp->varsize;
! 
! 	while (n_spex) {
! 
! 		if (bits == 8) printf("\t*c++ =   ");
! 		else printf("\t       | ");
! 
! 		if (vars == bits) {
! 	
! 			printf( (bits==8? "%s & 0x%lX;\n" : "(%s & 0x%lX);\n"),
! 				sp->var, 
! 				~(0xfffffffe << (bits - 1)));
! 			if (!-- n_spex) break;
! 			sp++;
! 
! 			vars = sp->varsize;
! 			bits = 8;
! 
! 		} else if (vars < bits) {
! 
! 			printf( "((%s & 0x%lX) << %d)",
! 				sp->var,
! 				~(0xfffffffe << (vars - 1)),
! 				bits - vars);
! 			bits -= vars;
! 			if (!--n_spex) {
! 				puts(";");
! 				break;
! 			}
! 			else putchar('\n');
! 			sp++;
! 			vars = sp->varsize;
! 
! 		} else {
! 			printf("((%s >> %d) & 0x%X);\n",
! 				sp->var, 
! 				vars - bits,
! 				~(0xfffffffe << (bits - 1)));
! 			
! 			vars -= bits;
! 			bits = 8;
! 		}
  	}
  }
--- 5,48 ----
  #include	"taste.h"
  #include	"proto.h"
  
+ #define BSIZE 16
+ 
  void write_code P2((s_spex, n_spex), struct spex * s_spex, int n_spex)
  {
!     struct spex* sp = s_spex;
!     int	n_in;
! 
!     printf("    unsigned short sr;\n");
!     printf("\n");
!     printf("    sr = 0;\n");
! 
!     n_in = 0;
!     while (n_spex > 0)
!     {
! 	printf("    sr = sr >> %d | %s << %d;\n",
! 	    sp->varsize,
! 	    sp->var, 
! 	    BSIZE - sp->varsize
! 	    );
! 	n_in += sp->varsize;
! 	if (n_in > 7)
! 	{
! 	    printf("    *c++ = sr >> %d;\n", BSIZE - n_in);
! 	    n_in -= 8;
  	}
+ 	n_spex--;
+ 	sp++;
+     }
+ 
+     if (n_in > 7)
+     {
+ 	printf("    *c++ = sr >> %d;\n", BSIZE - n_in);
+ 	n_in -= 8;
+     }
+ 
+     if (n_in > 0)
+     {
+ 	fprintf(stderr, "warning: %d bits left over\n", n_in);
+     }
+ 
  }



