AF_mix_u(3)							  AF_mix_u(3)



NAME
  AF_mix_u, AF_mix_a - ULAW and	ALAW mixing tables

SYNTAX
  #include <AF/AFUtils.h>

  extern unsigned char AF_mix_u[];

  extern unsigned char AF_mix_a[];

DESCRIPTION
  AF_mix_u and AF_mix_a	are precomputed	tables you can link with your appli-
  cation.  Each	is indexed by a	16 bit number composed of the concatenation
  of two ULAW or ALAW samples, respectively.  Each table contains the encoded
  sample corresponding to the sum of the linearized pair of samples making up
  the index.  This is useful for mixing	two signals.

EXAMPLES
  Typical usage	is:

  unsigned char	ulaw1, ulaw2, ulawsum;
  unsigned short index;
  /* first compose the index */
  index	= (ulaw1 << 8) | ulaw2
  /* then translate */
  ulawsum = AF_mix_u[ index ];

DIAGNOSTICS

  If you index the table with an out-of-range linear value you
	    may	cause a	protection fault and crash your	application.

SEE ALSO
  AF_exp_u(3), AF_exp_a(3), AF_comp_u(3), AF_comp_a(3)
  AF(1)

BUGS
  If you encounter a reproducible bug, please submit a problem report to
  (af-bugs@crl.dec.com).

COPYRIGHT
  Copyright 1990-1994, Digital Equipment Corporation.
  See AF(1) for	a full statement of rights and permissions.

AUTHORS
  Tom Levergood	and Larry Stewart, Digital Cambridge Research Lab