• Main Page
  • Related Pages
  • Data Structures
  • Files
  • File List
  • Globals

include/mulaw.h

Go to the documentation of this file.
00001 /* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */
00002 /* ====================================================================
00003  * Copyright (c) 1999-2001 Carnegie Mellon University.  All rights
00004  * reserved.
00005  *
00006  * Redistribution and use in source and binary forms, with or without
00007  * modification, are permitted provided that the following conditions
00008  * are met:
00009  *
00010  * 1. Redistributions of source code must retain the above copyright
00011  *    notice, this list of conditions and the following disclaimer. 
00012  *
00013  * 2. Redistributions in binary form must reproduce the above copyright
00014  *    notice, this list of conditions and the following disclaimer in
00015  *    the documentation and/or other materials provided with the
00016  *    distribution.
00017  *
00018  * This work was supported in part by funding from the Defense Advanced 
00019  * Research Projects Agency and the National Science Foundation of the 
00020  * United States of America, and the CMU Sphinx Speech Consortium.
00021  *
00022  * THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND 
00023  * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 
00024  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
00025  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY
00026  * NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
00027  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
00028  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
00029  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
00030  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
00031  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
00032  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00033  *
00034  * ====================================================================
00035  *
00036  */
00037 /*
00038  * muLaw.h -- Table for converting mu-law data into 16-bit linear PCM format.
00039  *
00040  * **********************************************
00041  * CMU ARPA Speech Project
00042  *
00043  * Copyright (c) 1996 Carnegie Mellon University.
00044  * ALL RIGHTS RESERVED.
00045  * **********************************************
00046  * 
00047  * HISTORY
00048  * 
00049  * 21-Jul-97    M K Ravishankar (rkm@cs.cmu.edu) at Carnegie Mellon University
00050  *              Created from Sunil Issar's version.
00051  */
00052 
00059 #ifndef _MULAW_H_
00060 #define _MULAW_H_
00061 
00062 
00063 static int16 muLaw[256] = {
00064  -0x1f5f, -0x1e5f, -0x1d5f, -0x1c5f, -0x1b5f, -0x1a5f, -0x195f, -0x185f,
00065  -0x175f, -0x165f, -0x155f, -0x145f, -0x135f, -0x125f, -0x115f, -0x105f,
00066  -0x0f9f, -0x0f1f, -0x0e9f, -0x0e1f, -0x0d9f, -0x0d1f, -0x0c9f, -0x0c1f,
00067  -0x0b9f, -0x0b1f, -0x0a9f, -0x0a1f, -0x099f, -0x091f, -0x089f, -0x081f,
00068  -0x07bf, -0x077f, -0x073f, -0x06ff, -0x06bf, -0x067f, -0x063f, -0x05ff,
00069  -0x05bf, -0x057f, -0x053f, -0x04ff, -0x04bf, -0x047f, -0x043f, -0x03ff,
00070  -0x03cf, -0x03af, -0x038f, -0x036f, -0x034f, -0x032f, -0x030f, -0x02ef,
00071  -0x02cf, -0x02af, -0x028f, -0x026f, -0x024f, -0x022f, -0x020f, -0x01ef,
00072  -0x01d7, -0x01c7, -0x01b7, -0x01a7, -0x0197, -0x0187, -0x0177, -0x0167,
00073  -0x0157, -0x0147, -0x0137, -0x0127, -0x0117, -0x0107, -0x00f7, -0x00e7,
00074  -0x00db, -0x00d3, -0x00cb, -0x00c3, -0x00bb, -0x00b3, -0x00ab, -0x00a3,
00075  -0x009b, -0x0093, -0x008b, -0x0083, -0x007b, -0x0073, -0x006b, -0x0063,
00076  -0x005d, -0x0059, -0x0055, -0x0051, -0x004d, -0x0049, -0x0045, -0x0041,
00077  -0x003d, -0x0039, -0x0035, -0x0031, -0x002d, -0x0029, -0x0025, -0x0021,
00078  -0x001e, -0x001c, -0x001a, -0x0018, -0x0016, -0x0014, -0x0012, -0x0010,
00079  -0x000e, -0x000c, -0x000a, -0x0008, -0x0006, -0x0004, -0x0002,  0x0000,
00080   0x1f5f,  0x1e5f,  0x1d5f,  0x1c5f,  0x1b5f,  0x1a5f,  0x195f,  0x185f,
00081   0x175f,  0x165f,  0x155f,  0x145f,  0x135f,  0x125f,  0x115f,  0x105f,
00082   0x0f9f,  0x0f1f,  0x0e9f,  0x0e1f,  0x0d9f,  0x0d1f,  0x0c9f,  0x0c1f,
00083   0x0b9f,  0x0b1f,  0x0a9f,  0x0a1f,  0x099f,  0x091f,  0x089f,  0x081f,
00084   0x07bf,  0x077f,  0x073f,  0x06ff,  0x06bf,  0x067f,  0x063f,  0x05ff,
00085   0x05bf,  0x057f,  0x053f,  0x04ff,  0x04bf,  0x047f,  0x043f,  0x03ff,
00086   0x03cf,  0x03af,  0x038f,  0x036f,  0x034f,  0x032f,  0x030f,  0x02ef,
00087   0x02cf,  0x02af,  0x028f,  0x026f,  0x024f,  0x022f,  0x020f,  0x01ef,
00088   0x01d7,  0x01c7,  0x01b7,  0x01a7,  0x0197,  0x0187,  0x0177,  0x0167,
00089   0x0157,  0x0147,  0x0137,  0x0127,  0x0117,  0x0107,  0x00f7,  0x00e7,
00090   0x00db,  0x00d3,  0x00cb,  0x00c3,  0x00bb,  0x00b3,  0x00ab,  0x00a3,
00091   0x009b,  0x0093,  0x008b,  0x0083,  0x007b,  0x0073,  0x006b,  0x0063,
00092   0x005d,  0x0059,  0x0055,  0x0051,  0x004d,  0x0049,  0x0045,  0x0041,
00093   0x003d,  0x0039,  0x0035,  0x0031,  0x002d,  0x0029,  0x0025,  0x0021,
00094   0x001e,  0x001c,  0x001a,  0x0018,  0x0016,  0x0014,  0x0012,  0x0010,
00095   0x000e,  0x000c,  0x000a,  0x0008,  0x0006,  0x0004,  0x0002,  0x0000,
00096 };
00097 
00098 
00099 #endif

Generated on Thu Jan 6 2011 for SphinxBase by  doxygen 1.7.1