man3/AFMakeGainTableA.3

#

    AFMakeGainTableU(3)					  AFMakeGainTableU(3)

    NAME
      AFMakeGainTableU, AFMakeGainTableA - generate	gain table

    SYNTAX
      #include <AF/AFUtils.h>

      extern void AFMakeGainTableU(unsigned	char *table, double dBgain);

    DESCRIPTION
      AFMakeGainTableU and AFMakeGainTableA	are subroutines	which generate gain
      tables for ULAW and ALAW samples, respectively.

    ARGUMENTS

      table
           is a pointer to a 256 byte table	supplied by the	caller.	 This table
           is filled in by AFMakeGainTable.

      dBgain
           specifies the desired gain.  For	example, 0.0 would generate a table
           that translates a sample	to itself.

    EXAMPLES
      Typical usage	is:

      unsigned char	table[256];
      unsigned char	input, output;
      /* first generate a 5	dB gain	table */
      AFMakeGainTableU(&table[0], 5.0);
      /* then translate */
      output = table[ input	];

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

    SEE ALSO
      AF_gain_table_u(3), AF_gain_table_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
      Larry	Stewart, Digital Cambridge Research Lab