⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mpegtab.c

📁 Application (fix point) for playing MP3 data on embedded systems. mp3play is designed to be able to
💻 C
📖 第 1 页 / 共 5 页
字号:
/*------------------------------------------------------------------------------    File    :   MPEGTAB.C    Author  :   St閜hane TAVENARD    $VER:   MPEGTAB.C  0.1  (31/03/1997)    (C) Copyright 1997-1997 St閜hane TAVENARD        All Rights Reserved  This program is free software; you can redistribute it and/or modify  it under the terms of the GNU General Public License as published by  the Free Software Foundation; either version 2 of the License, or  (at your option) any later version.   This program is distributed in the hope that it will be useful,  but WITHOUT ANY WARRANTY; without even the implied warranty of  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the  GNU General Public License for more details.   You should have received a copy of the GNU General Public License  along with this program; if not, write to the Free Software  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.    #Rev|   Date   |                      Comment    ----|----------|--------------------------------------------------------    0   |19/02/1997| Initial revision                                     ST    1   |31/03/1997| First Aminet release                                 ST    ------------------------------------------------------------------------    MPEG Audio tables------------------------------------------------------------------------------*/#include "defs.h"#include "mpegaud.h"#include "mpegtab.h"const UINT16 MPT_freq[ 2 ][ 4 ] = {   { 22050, 24000, 16000, 0 },   { 44100, 48000, 32000, 0 }};//  MPT_bitrate[ ID ][ Layer-1 ][ BitrateIndex ]//  MPEG1->ID=1 MPEG2->ID=0const INT16 MPT_bitrate[ 2 ][ 3 ][ 16 ] = {   { {0,32,48,56,64,80,96,112,128,144,160,176,192,224,256,0},     {0,8,16,24,32,40,48,56,64,80,96,112,128,144,160,0},     {0,8,16,24,32,40,48,56,64,80,96,112,128,144,160,0} },   { {0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,0},     {0,32,48,56,64,80,96,112,128,160,192,224,256,320,384,0},     {0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,0} }};const INT16 MPT_sblimit[ 5 ] = { 27, 30, 8, 12, 30 };const INT16 MPT_jsbound[ 3 ][ 4 ] = {   { 4, 8, 12, 16 }, { 4, 8, 12, 16 }, { 0, 4, 8, 16 }};#ifdef MPEGAUD_INT// 15 bits dec. mult tableconst MPEGTAB_MULT_TYPE MPT_multiple[ 64 ] = {   0x10000,0xCB2F,0xA145,0x8000,0x6597,0x50A2,0x4000,0x32CB,   0x2851,0x2000,0x1965,0x1428,0x1000,0x0CB2,0x0A14,0x0800,   0x0659,0x050A,0x0400,0x032C,0x0285,0x0200,0x0196,0x0142,   0x0100,0x00CB,0x00A1,0x0080,0x0065,0x0050,0x0040,0x0032,   0x0028,0x0020,0x0019,0x0014,0x0010,0x000C,0x000A,0x0008,   0x0006,0x0005,0x0004,0x0003,0x0002,0x0002,0x0001,0x0001,   0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,   0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000};// Dewindowing table (integer values) (14 bits)const MPEGTAB_DEW_TYPE MPT_dewindow[ 512 ] = {       +0,    -7,   +53,  -114,  +509, -1288, +1643, -9372,+18759, +9372, +1643, +1288,  +509,  +114,   +53,    +7,       +0,    -7,   +54,  -129,  +499, -1379, +1489, -9833,+18747, +8909, +1783, +1196,  +515,  +100,   +51,    +6,       +0,    -8,   +55,  -145,  +487, -1469, +1321,-10293,+18713, +8447, +1909, +1106,  +519,   +86,   +50,    +6,       +0,    -9,   +56,  -161,  +473, -1559, +1140,-10751,+18657, +7986, +2022, +1015,  +521,   +73,   +49,    +5,       +0,   -10,   +56,  -177,  +455, -1647,  +943,-11205,+18578, +7527, +2122,  +926,  +521,   +61,   +47,    +4,       +0,   -11,   +57,  -194,  +434, -1733,  +733,-11654,+18476, +7072, +2209,  +837,  +518,   +49,   +45,    +4,       +0,   -12,   +57,  -211,  +410, -1817,  +509,-12097,+18353, +6620, +2284,  +750,  +514,   +38,   +44,    +4,       +0,   -13,   +56,  -229,  +383, -1899,  +270,-12534,+18208, +6173, +2347,  +665,  +507,   +27,   +42,    +3,       +0,   -14,   +56,  -247,  +353, -1977,   +17,-12963,+18042, +5732, +2397,  +582,  +500,   +18,   +40,    +3,       +0,   -15,   +55,  -266,  +320, -2052,  -249,-13383,+17854, +5297, +2437,  +501,  +490,    +8,   +38,    +2,       +0,   -17,   +53,  -284,  +282, -2122,  -530,-13794,+17647, +4869, +2465,  +422,  +479,    +0,   +36,    +2,       +0,   -18,   +51,  -302,  +242, -2188,  -824,-14194,+17419, +4449, +2483,  +346,  +467,    -7,   +34,    +2,       +0,   -19,   +50,  -320,  +198, -2249, -1133,-14583,+17172, +4038, +2491,  +273,  +454,   -14,   +32,    +1,       +0,   -21,   +47,  -338,  +151, -2304, -1454,-14959,+16907, +3636, +2489,  +203,  +439,   -20,   +31,    +1,       +0,   -22,   +44,  -356,  +100, -2353, -1788,-15322,+16623, +3244, +2478,  +136,  +424,   -26,   +29,    +1,       -1,   -24,   +40,  -374,   +46, -2396, -2134,-15670,+16322, +2863, +2459,   +71,  +408,   -31,   +27,    +1,       -1,   -25,   +36,  -391,   -11, -2431, -2493,-16004,+16004, +2493, +2431,   +11,  +391,   -36,   +25,    +1,       -1,   -27,   +31,  -408,   -71, -2459, -2863,-16322,+15670, +2134, +2396,   -46,  +374,   -40,   +24,    +1,       -1,   -29,   +26,  -424,  -136, -2478, -3244,-16623,+15322, +1788, +2353,  -100,  +356,   -44,   +22,    +0,       -1,   -31,   +20,  -439,  -203, -2489, -3636,-16907,+14959, +1454, +2304,  -151,  +339,   -47,   +21,    +0,       -1,   -32,   +14,  -454,  -273, -2491, -4038,-17172,+14583, +1133, +2249,  -198,  +320,   -50,   +19,    +0,       -2,   -34,    +7,  -467,  -346, -2483, -4449,-17419,+14194,  +825, +2188,  -242,  +302,   -51,   +18,    +0,       -2,   -36,    +0,  -479,  -422, -2465, -4869,-17647,+13794,  +530, +2122,  -282,  +284,   -53,   +17,    +0,       -2,   -38,    -8,  -490,  -501, -2437, -5297,-17854,+13383,  +249, +2052,  -319,  +266,   -55,   +15,    +0,       -3,   -40,   -18,  -500,  -582, -2397, -5732,-18042,+12963,   -17, +1977,  -353,  +247,   -55,   +14,    +0,       -3,   -42,   -27,  -507,  -665, -2347, -6173,-18208,+12534,  -270, +1899,  -383,  +229,   -56,   +13,    +0,       -4,   -44,   -38,  -514,  -750, -2284, -6620,-18353,+12097,  -509, +1817,  -410,  +211,   -57,   +12,    +0,       -4,   -45,   -49,  -518,  -837, -2209, -7072,-18476,+11654,  -733, +1733,  -434,  +194,   -57,   +11,    +0,       -4,   -47,   -61,  -521,  -926, -2122, -7527,-18578,+11205,  -943, +1647,  -455,  +177,   -56,   +10,    +0,       -5,   -49,   -73,  -521, -1015, -2022, -7986,-18657,+10751, -1140, +1559,  -473,  +161,   -56,    +9,    +0,       -6,   -50,   -86,  -519, -1106, -1909, -8447,-18713,+10293, -1321, +1469,  -487,  +145,   -55,    +8,    +0,       -6,   -51,  -100,  -515, -1196, -1783, -8909,-18747, +9833, -1489, +1379,  -499,  +129,   -54,    +7,    +0};#elseconst MPEGTAB_MULT_TYPE MPT_multiple[ 64 ] = {2.00000000000000, 1.58740105196820, 1.25992104989487,1.00000000000000, 0.79370052598410, 0.62996052494744, 0.50000000000000,0.39685026299205, 0.31498026247372, 0.25000000000000, 0.19842513149602,0.15749013123686, 0.12500000000000, 0.09921256574801, 0.07874506561843,0.06250000000000, 0.04960628287401, 0.03937253280921, 0.03125000000000,0.02480314143700, 0.01968626640461, 0.01562500000000, 0.01240157071850,0.00984313320230, 0.00781250000000, 0.00620078535925, 0.00492156660115,0.00390625000000, 0.00310039267963, 0.00246078330058, 0.00195312500000,0.00155019633981, 0.00123039165029, 0.00097656250000, 0.00077509816991,0.00061519582514, 0.00048828125000, 0.00038754908495, 0.00030759791257,0.00024414062500, 0.00019377454248, 0.00015379895629, 0.00012207031250,0.00009688727124, 0.00007689947814, 0.00006103515625, 0.00004844363562,0.00003844973907, 0.00003051757813, 0.00002422181781, 0.00001922486954,0.00001525878906, 0.00001211090890, 0.00000961243477, 0.00000762939453,0.00000605545445, 0.00000480621738, 0.00000381469727, 0.00000302772723,0.00000240310869, 0.00000190734863, 0.00000151386361, 0.00000120155435,1E-20};const MPEGTAB_DEW_TYPE MPT_dewindow[ 512 ] = {   +0.000000000, -0.000442505, +0.003250122, -0.007003784, +0.031082153, -0.078628540, +0.100311279, -0.572036743, +1.144989014, +0.572036743, +0.100311279, +0.078628540, +0.031082153, +0.007003784, +0.003250122, +0.000442505,   -0.000015259, -0.000473022, +0.003326416, -0.007919312, +0.030517578, -0.084182739, +0.090927124, -0.600219727, +1.144287109, +0.543823242, +0.108856201, +0.073059082, +0.031478882, +0.006118774, +0.003173828, +0.000396729,   -0.000015259, -0.000534058, +0.003387451, -0.008865356, +0.029785156, -0.089706421, +0.080688477, -0.628295898, +1.142211914, +0.515609741, +0.116577148, +0.067520142, +0.031738281, +0.005294800, +0.003082275, +0.000366211,   -0.000015259, -0.000579834, +0.003433228, -0.009841919, +0.028884888, -0.095169067, +0.069595337, -0.656219482, +1.138763428, +0.487472534, +0.123474121, +0.061996460, +0.031845093, +0.004486084, +0.002990723, +0.000320435,

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -