亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? g721.c

?? 基于EP7312的MP3播放器源代碼,包括MCU和PC端代碼.
?? C
?? 第 1 頁 / 共 2 頁
字號:
//****************************************************************************//// G721.C - Codec interface driver for the G.721 encoder/decoder.//// Copyright (c) 1999,2000,2001 Cirrus Logic, Inc.////****************************************************************************#include "globals.h"#ifdef SUPPORT_G721#include "adpcm/g72x.h"#include "buffer/buffer.h"#include "src/src.h"//****************************************************************************//// The name of this codec.////****************************************************************************static const unsigned short pusCodecName[] ={    'G', '7', '2', '1', 'G', '.', '7', '2', '1', ' ', 'A', 'D',    'P', 'C', 'M', '\0'};//****************************************************************************//// A structure which defines the persistent state of the G.721 encoder/// decoder.////****************************************************************************typedef struct{    //    // The file from which we read data when decoding or to which we write data    // when encoding.    //    tFile *pFile;    //    // The buffer which holds the encoded G.721 audio.    //    char pcEncodedData[512 + 128];    //    // The buffer which holds the 8000Hz PCM audio stream.    //    short psSRCData[512 + NUMTAPS - 1];    //    // The buffer which holds the 44100Hz PCM audio stream when encoding.    //    short psRawData[4096 + NUMTAPS - 1];    //    // The persistent state of the G.721 encoder/decoder.    //    struct g72x_state sG721;    //    // The buffer from which we read the PCM audio stream when encoding or to    // which we write the PCM audio stream when decoding.    //    BufferState *pBuffer;    //    // The length of the encoded G.721 file.    //    unsigned long ulLength;    //    // The number of bytes in pcEncodedData which contain valid encoded    // G.721 audio.    //    unsigned short usValid;    //    // The offset into pcEncodedData of the next G.721 sample to be processed.    //    unsigned short usOffset;    //    // The length of the file in milliseconds.    //    unsigned long ulTimeLength;    //    // The number of G.721 samples that have been processed, either decoded and    // played via the DAI interface or recorded via the DAI interface and    // encoded.    //    unsigned long ulTimePos;    //    // The current offset into the G.721 file, indicating the number of    // bytes which have been read from the file into the encoded data buffer.    //    unsigned long ulFilePos;} tG721;//****************************************************************************//// The codec plug-in entry point for the G.721 encoder/decoder.////****************************************************************************unsigned longG721Ioctl(unsigned long ulIoctl, unsigned long ulParam1,          unsigned long ulParam2, unsigned long ulParam3,          unsigned long ulParam4){    //    // Determine what to do based on the specified IOCTL.    //    switch(ulIoctl)    {        //        // Return the name for this codec.        //        case IOCTL_CODEC_GETNAME:        {            const unsigned short **ppusName;            //            // The secod parameter is a pointer for the name.            //            ppusName = (const unsigned short **)ulParam2;            //            // Return the name of this codec.  The first four characters are            // the short name and the string starting at the fifth character            // is the long name.            //            *ppusName = pusCodecName;            //            // Success.            //            return(1);        }        //        // Return the name of the artist.        //        case IOCTL_CODEC_GETARTIST:        {            unsigned short **ppusName;            //            // The second parameter is a pointer for the name.            //            ppusName = (unsigned short **)ulParam2;            //            // There is no way to store the artist name in a G.721 file.            //            *ppusName = 0;            //            // Success.            //            return(1);        }        //        // Return the name of the song        //        case IOCTL_CODEC_GETTITLE:        {            unsigned short **ppusName;            //            // The second parameter is a pointer for the name.            //            ppusName = (unsigned short **)ulParam2;            //            // There is no way to store the song title in a G.721 file.            //            *ppusName = 0;            //            // Success.            //            return(1);        }        //        // Return the bitrate at which this file is encoded.        //        case IOCTL_CODEC_GETBITRATE:        {            unsigned long *pulBitRate;            //            // The second parameter is a pointer for the bitrate.            //            pulBitRate = (unsigned long *)ulParam2;            //            // The bitrate of G.721 is 32kbps.            //            *pulBitRate = 32000;            //            // Success.            //            return(1);        }        //        // Return the sample rate at which this file is encoded.        //        case IOCTL_CODEC_GETSAMPLERATE:        {            unsigned long *pulSampleRate;            //            // The second parameter is a pointer for the sample rate.            //            pulSampleRate = (unsigned long *)ulParam2;            //            // The sample rate of this G.721 codec is 8kHz.            //            *pulSampleRate = 8000;            //            // Success.            //            return(1);        }        //        // Return the number of channels in the file.        //        case IOCTL_CODEC_GETCHANNELS:        {            unsigned long *pulChannels;            //            // The second parameter is a pointer for the number of channels.            //            pulChannels = (unsigned long *)ulParam2;            //            // The file contains only a single channel.            //            *pulChannels = 1;            //            // Success.            //            return(1);        }        //        // Return the length (in milliseconds) of the file.        //        case IOCTL_CODEC_GETLENGTH:        {            unsigned long *pulLength;            tG721 *pG721;            //            // The first parameter is a pointer ot the G.721 persistent data.            //            pG721 = (tG721 *)ulParam1;            //            // The second parameter is a pointer for the number of            // milliseconds.            //            pulLength = (unsigned long *)ulParam2;            //            // Return the length of the file.            //            *pulLength = pG721->ulTimeLength;            //            // Success.            //            return(1);        }        //        // Return the current position (in milliseconds) within the file.        //        case IOCTL_CODEC_GETTIME:        {            unsigned long *pulTime;            tG721 *pG721;            //            // The first parameter is a pointer to the G.721 persistent data.            //            pG721 = (tG721 *)ulParam1;            //            // The second parameter is a pointer for the number of            // milliseconds.            //            pulTime = (unsigned long *)ulParam2;            //            // Determine the time based on the sample rate.            //            *pulTime = pG721->ulTimePos / 8;            //            // Success.            //            return(1);        }        //        // Determine if the given file can be decoded.        //        case IOCTL_CODEC_QUERY:        {            tFile *pFile;            unsigned char *pucScratch;            //            // The second parameter is the file to be checked.            //            pFile = (tFile *)ulParam2;            //            // The third parameters is a 512 byte scratch buffer.            //            pucScratch = (unsigned char *)ulParam3;            //            // Read the first 512 bytes from the file.            //            FSRead(pFile, pucScratch, 512);            //            // Make sure that the first four bytes of the file are "G721".            //            if((pucScratch[0] != 'G') || (pucScratch[1] != '7') ||               (pucScratch[2] != '2') || (pucScratch[3] != '1'))            {                return(0);            }            //            // We can decode this file.            //            return(1);        }        //        // Prepare the codec to encode or decode a file.        //        case IOCTL_CODEC_OPEN:        {            tG721 *pG721;            //            // The first parameter is a pointer to the G.721 persistent state.            //            pG721 = (tG721 *)ulParam1;            //            // Make sure that we have enough memory for this decoder.            //            if(((unsigned long)pG721 + sizeof(tG721)) > ulExtentOfRAM)            {                return(0);            }            //            // Initialize the G.721 decoder.            //            g72x_init_state(&(pG721->sG721));            //            // Save the pointer to the file structure.            //            pG721->pFile = (tFile *)ulParam4;            //            // See if we should encode or decode.            //            if(ulParam3 & CODEC_OPEN_ENCODE)            {                //                // The first four bytes of the file are "G721" to indicate that                // this is a G.721 file.                //                pG721->pcEncodedData[0] = 'G';                pG721->pcEncodedData[1] = '7';                pG721->pcEncodedData[2] = '2';                pG721->pcEncodedData[3] = '1';                //                // There are four bytes in the output buffer.                //                pG721->usValid = 4;                //                // The initial time position and length is zero.                //                pG721->ulTimePos = pG721->ulTimeLength = 0;                //                // The first write in the file will occur at position 0.                //                pG721->ulFilePos = 0;                //                // The initial length of the file is zero.                //                pG721->ulLength = 0;            }            else            {                //                // Read the first page of the file.                //                FSRead(pG721->pFile, pG721->pcEncodedData, 512);                //                // Make sure that the first four bytes of the file are "G721".                //                if((pG721->pcEncodedData[0] != 'G') ||                   (pG721->pcEncodedData[1] != '7') ||                   (pG721->pcEncodedData[2] != '2') ||                   (pG721->pcEncodedData[3] != '1'))                {                    return(0);                }                //                // Since we've just read the first page of the file, the next                // read will occur at location 512 into the file.                //                pG721->ulFilePos = 512;                //                // Get the length of the G.721 file.                //                pG721->ulLength = FSLength(pG721->pFile);                //                // Initially, the 512 bytes previously read into the buffer are                // valid.                //                pG721->usValid = 512;                //                // Make sure the file position and the valid data size are less                // than the file length.                //                if(pG721->ulFilePos > pG721->ulLength)                {                    pG721->ulFilePos = pG721->ulLength;                    pG721->usValid = pG721->ulLength;                }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲久草在线视频| 欧美日韩和欧美的一区二区| 日韩精品一区二区三区三区免费 | 国产精品九色蝌蚪自拍| 国产成人av资源| 1000部国产精品成人观看| av不卡在线播放| 一区二区三区在线高清| 欧美三级中文字| 蜜桃av一区二区三区| 日韩一区二区三区四区| 国产成人在线观看免费网站| 国产精品嫩草影院com| 色94色欧美sute亚洲线路二 | 在线播放亚洲一区| 狂野欧美性猛交blacked| 久久久久久夜精品精品免费| 成人动漫在线一区| 亚洲亚洲精品在线观看| 日韩精品一区二区三区中文精品| 成人在线视频一区二区| 一区二区三区中文在线观看| 欧美日韩免费不卡视频一区二区三区| 麻豆精品视频在线观看| 久久免费午夜影院| 在线观看国产精品网站| 另类人妖一区二区av| 日韩一区在线播放| 欧美一卡2卡三卡4卡5免费| 粉嫩一区二区三区性色av| 亚洲综合在线五月| 国产亚洲污的网站| 欧美日韩小视频| 国产二区国产一区在线观看| 亚洲一区二区三区在线看| 精品动漫一区二区三区在线观看 | 一道本成人在线| 美女视频一区在线观看| 亚洲人精品午夜| 国产精品美日韩| 欧美色手机在线观看| 国产在线精品免费| 午夜精品国产更新| 国产精品国产三级国产三级人妇| 欧美乱妇23p| 成人18精品视频| 激情综合色播激情啊| 亚洲永久精品国产| 亚洲国产激情av| 精品播放一区二区| 6080国产精品一区二区| 日本精品视频一区二区| 狠狠狠色丁香婷婷综合激情| 亚洲成人激情自拍| 亚洲三级理论片| 中文av一区二区| 久久久久久一级片| 日韩一区二区三区免费看| 欧美三级视频在线| 一本大道久久精品懂色aⅴ| 粉嫩绯色av一区二区在线观看| 麻豆国产精品官网| 天堂影院一区二区| 亚洲444eee在线观看| 一区av在线播放| 成人免费视频在线观看| 中文字幕av一区二区三区| 久久―日本道色综合久久| 日韩亚洲欧美综合| 欧美一级免费观看| 欧美一区欧美二区| 欧美一区二区三区男人的天堂| 欧美日韩亚州综合| 欧美日韩日本视频| 制服丝袜成人动漫| 欧美一区二区在线播放| 欧美高清性hdvideosex| 欧美精品国产精品| 欧美一级日韩免费不卡| 日韩欧美在线网站| 日韩免费高清电影| 久久亚洲一级片| 中文字幕乱码日本亚洲一区二区| 日韩精品专区在线影院观看| 日韩一区和二区| 精品动漫一区二区三区在线观看| 欧美tickling挠脚心丨vk| 欧美变态tickling挠脚心| 精品电影一区二区| 欧美国产日韩a欧美在线观看| 国产精品无圣光一区二区| 中文字幕一区在线观看| 一区二区三区.www| 日韩精品午夜视频| 日本不卡的三区四区五区| 精品一区二区日韩| 国产成人综合在线观看| 91视频在线观看免费| 欧美午夜精品电影| 日韩免费观看2025年上映的电影| 久久久国际精品| 亚洲欧美电影院| 性做久久久久久免费观看欧美| 日本最新不卡在线| 国产伦精品一区二区三区免费 | 蜜桃视频在线观看一区二区| 蜜臀av国产精品久久久久| 国产馆精品极品| 欧美婷婷六月丁香综合色| 日韩片之四级片| 国产精品拍天天在线| 亚洲高清在线视频| 国产精品羞羞答答xxdd| 91传媒视频在线播放| 日韩午夜av一区| 亚洲欧美综合另类在线卡通| 午夜国产精品影院在线观看| 国产麻豆成人传媒免费观看| 91激情在线视频| 2020国产精品自拍| 亚洲人成网站影音先锋播放| 蜜臀国产一区二区三区在线播放 | 在线亚洲一区二区| 日韩精品一区二区在线观看| 18成人在线观看| 九一九一国产精品| 色av综合在线| 久久久.com| 日韩高清国产一区在线| 成人av资源站| 欧美精品一区二区三区蜜桃视频| 亚洲乱码中文字幕综合| 国产主播一区二区| 欧美女孩性生活视频| 国产精品久久精品日日| 国模一区二区三区白浆| 欧美日韩精品一区视频| 国产精品成人在线观看| 精品一区二区三区在线观看 | av电影一区二区| 欧美激情在线观看视频免费| 亚洲五码中文字幕| aaa欧美色吧激情视频| 久久免费美女视频| 免费精品视频在线| 欧美性受xxxx| 亚洲丝袜制服诱惑| 国产成人超碰人人澡人人澡| 日韩视频中午一区| 亚洲国产一区二区在线播放| av影院午夜一区| 国产丝袜欧美中文另类| 久久精品国产**网站演员| 欧美丰满一区二区免费视频| 一区二区三区中文免费| av午夜一区麻豆| 中文字幕一区二区三区四区| 国产剧情一区二区三区| 日韩欧美国产成人一区二区| 亚洲午夜久久久久久久久电影院 | 一区二区三区日韩精品视频| 国产成人在线观看| 久久精品这里都是精品| 国产精品一级片在线观看| 亚洲精品一区二区三区蜜桃下载 | 国产目拍亚洲精品99久久精品| 麻豆91在线播放免费| 777欧美精品| 日韩国产欧美在线观看| 欧美日韩精品福利| 婷婷国产在线综合| 久久久久久夜精品精品免费| 久久成人久久爱| 欧美一激情一区二区三区| 青青草97国产精品免费观看 | 偷窥国产亚洲免费视频| 欧美色图一区二区三区| 亚洲成av人片在线| 欧美欧美午夜aⅴ在线观看| 美女脱光内衣内裤视频久久影院| 日韩一区二区三区免费看| 免费成人av在线播放| 日韩欧美资源站| 国产精品一二三四| 国产精品乱人伦一区二区| 色综合色狠狠天天综合色| 一区二区三区四区不卡在线| 欧洲精品在线观看| 奇米四色…亚洲| 国产日韩欧美麻豆| 91香蕉视频mp4| 石原莉奈在线亚洲二区| xf在线a精品一区二区视频网站| 国产精品白丝jk黑袜喷水| 国产精品女主播av| 欧美日韩在线三区| 国产一区二区在线电影| 中文字幕一区二区三区乱码在线| 欧洲人成人精品| 久草中文综合在线|