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

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

?? audio.c

?? JPEG-MPEG編解碼技術書集的代碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
/**********************************************************************
MPEG-4 Audio VM
Audio i/o module



This software module was originally developed by

Heiko Purnhagen (University of Hannover / ACTS-MoMuSys)

and edited by

in the course of development of the MPEG-2 NBC/MPEG-4 Audio standard
ISO/IEC 13818-7, 14496-1,2 and 3. This software module is an
implementation of a part of one or more MPEG-2 NBC/MPEG-4 Audio tools
as specified by the MPEG-2 NBC/MPEG-4 Audio standard. ISO/IEC gives
users of the MPEG-2 NBC/MPEG-4 Audio standards free license to this
software module or modifications thereof for use in hardware or
software products claiming conformance to the MPEG-2 NBC/ MPEG-4 Audio
standards. Those intending to use this software module in hardware or
software products are advised that this use may infringe existing
patents. The original developer of this software module and his/her
company, the subsequent editors and their companies, and ISO/IEC have
no liability for use of this software module or modifications thereof
in an implementation. Copyright is not released for non MPEG-2
NBC/MPEG-4 Audio conforming products. The original developer retains
full right to use the code for his/her own purpose, assign or donate
the code to a third party and to inhibit third party from using the
code for non MPEG-2 NBC/MPEG-4 Audio conforming products. This
copyright notice must be included in all copies or derivative works.

Copyright (c) 1996, 1999.



Source file: audio.c

$Id: audio.c,v 1.3 2002/07/08 15:02:34 mvillari Exp $

Required libraries:
libtsp.a		AFsp audio file library

Required modules:
common.o		common module
austream.o		audio i/o streams (.au format)

Authors:
HP    Heiko Purnhagen, Uni Hannover <purnhage@tnt.uni-hannover.de>
BT    Bodo Teichmann, FhG/IIS <tmn@iis.fhg.de>

Changes:
21-jan-97   HP    born (using AFsp-V2R2)
27-jan-97   HP    set unavailable samples to 0 in AudioReadData()
03-feb-97   HP    fix bug AudioInit formatString=NULL
19-feb-97   HP    made internal data structures invisible
21-feb-97   BT    raw: big-endian
12-sep-97   HP    fixed numSample bug for mch files in AudioOpenRead()
30-dec-98   HP    uses austream for stdin/stdout, evaluates USE_AFSP
07-jan-99   HP    AFsp-v4r1 (AFsp-V3R2 still supported)
11-jan-99   HP    clipping & seeking for austream module
17-jan-99   HP    fixed quantisation to 16 bit
26-jan-99   HP    improved output file format evaluation
17-may-99   HP    improved output file format detection
**********************************************************************/


#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>

#ifdef USE_AFSP
#include <libtsp.h>		/* AFsp audio file library */
#include <libtsp/AFpar.h>	/* AFsp audio file library - definitions */
#endif

#include "audio.h"		/* audio i/o module */
#include "common_m4a.h"		/* common module */
#include "austream.h"		/* audio i/o streams (.au format) */
#include "bitstream.h"

/* ---------- declarations ---------- */

#define SAMPLE_BUF_SIZE 16384	/* local sample buffer size */

#define min(a,b) ((a) < (b) ? (a) : (b))
#define max(a,b) ((a) > (b) ? (a) : (b))

#ifdef USE_AFSP
#ifdef FW_SUN
/* only AFsp-V3R2 available: map AFsp-V3R2 to AFsp-v4r1 */
#define AFsetNHpar AFsetNH
#define FTW_AU (FW_SUN/256)
#define FTW_WAVE (FW_WAVE/256)
#define FTW_AIFF_C (FW_AIFF_C/256)
#define FTW_NH_EB (FW_NH_EB/256)
#endif
#endif


/* ---------- declarations (structures) ---------- */

struct AudioFileStruct		/* audio file handle */
{
#ifdef USE_AFSP
  AFILE *file;			/* AFILE handle */
#else
  int *file;
#endif
  AuStream *stream;		/* AuStream handle */
				/*   NULL if AFsp used */
  int numChannel;		/* number of channels */
  long currentSample;		/* number of samples read/written */
				/* (samples per channel!) */
  int write;			/* 0=read  1=write */
  long numClip;			/* number of samples clipped */
};


/* ---------- variables ---------- */

static int AUdebugLevel = 0;	/* debug level */


/* ---------- local functions ---------- */

int isfmtstr (char *filename, char *fmtstr)
/* isfmtstr returns true if filename has extension fmtstr */
{
  int i;

  i = strlen(filename)-strlen(fmtstr);
  if (i<0)
    return 0;
  filename += i;
  while (*filename) {
    if (tolower(*filename) != *fmtstr)
      return 0;
    filename++;
    fmtstr++;
  }
  return 1;
}


/* ---------- functions ---------- */


/* AudioInit() */
/* Init audio i/o module. */
/* formatString options: see AFsp documentation */

void AudioInit (
  char *formatString,		/* in: file format for headerless files */
  int debugLevel)		/* in: debug level */
				/*     0=off  1=basic  2=full */
{
  AUdebugLevel = debugLevel;
  if (AUdebugLevel >= 1) {
    printf("AudioInit: formatString=\"%s\"\n",
	   (formatString!=NULL)?formatString:"(null)");
    printf("AudioInit: debugLevel=%d\n",AUdebugLevel);
#ifdef USE_AFSP
    printf("AudioInit: all AFsp file formats supported\n");
#else
    printf("AudioInit: only 16 bit .au format supported\n");
#endif
  }
#ifdef USE_AFSP
  if (formatString!=NULL)
    AFsetNHpar(formatString);   /* headerless file support */
#endif
}


/* AudioOpenRead() */
/* Open audio file for reading. */

AudioFile *AudioOpenRead (
  char *fileName,		/* in: file name */
				/*     "-": stdin (only 16 bit .au) */
  int *numChannel,		/* out: number of channels */
  float *fSample,		/* out: sampling frequency [Hz] */
  long *numSample)		/* out: number of samples in file */
				/*      (samples per channel!) */
				/*      or 0 if not available */
				/* returns: */
				/*  audio file (handle) */
				/*  or NULL if error */
{
  AudioFile *file;
#ifdef USE_AFSP
  AFILE *af;
#else
  int *af;
#endif
  AuStream *as;
  long ns;
  long nc;
  int nci;
  float fs;

  if (AUdebugLevel >= 1)
    printf("AudioOpenRead: fileName=\"%s\"\n",fileName);

  if ((file=(AudioFile*)malloc(sizeof(AudioFile))) == NULL)
    CommonExit(1,"AudioOpenRead: memory allocation error");


#ifdef USE_AFSP
  if (strcmp(fileName,"-")) {
    af = AFopenRead(fileName,&ns,&nc,&fs,
		    AUdebugLevel?stdout:(FILE*)NULL);
    as = NULL;
  }
  else {
#endif
    af = NULL;
    as = AuOpenRead(fileName,&nci,&fs,&ns);
    nc = nci;
    ns = max(0,ns);
#ifdef USE_AFSP
  }
#endif

  if (as==NULL && af==NULL) {
    CommonWarning("AudioOpenRead: error opening audio file %s",fileName);
   FREE(file);
    return (AudioFile*)NULL;
  }

  file->file = af;
  file->stream = as;
  file->numChannel = nc;
  file->currentSample = 0;
  file->write = 0;
  file->numClip = 0;
  *numChannel = nc;
  *fSample = fs;
  *numSample = ns/nc;

  if (AUdebugLevel >= 1)
    printf("AudioOpenRead: numChannel=%d  fSample=%.1f  numSample=%ld\n",
	   *numChannel,*fSample,*numSample);

  return file;
}


/* AudioOpenWrite() */
/* Open audio file for writing. */
/* Sample format: 16 bit twos complement, uniform quantisation */
/* Supported file formats: (matching substring of format) */
/*  au, snd:  Sun (AFsp) audio file */
/*  wav:      RIFF WAVE file */
/*  aif:      AIFF-C audio file */
/*  raw:      headerless (raw) audio file (native byte order) */

AudioFile *AudioOpenWrite (
  char *fileName,		/* in: file name */
				/*     "-": stdout (only 16 bit .au) */
  char *format,			/* in: file format (ignored if stdout) */
				/*     (au, snd, wav, aif, raw) */
  int numChannel,		/* in: number of channels */
  float fSample)		/* in: sampling frequency [Hz] */
				/* returns: */
				/*  audio file (handle) */
				/*  or NULL if error */
{
  AudioFile *file;
#ifdef USE_AFSP
  AFILE *af;
  int fmt;
  int fmti;
  struct {
    char *str;
    int fmt;
  } fmtstr[] = {
    {"au",FTW_AU*256},
    {"snd",FTW_AU*256},
    {"wav",FTW_WAVE*256},
    {"wave",FTW_WAVE*256},
    {"aif",FTW_AIFF_C*256},
    {"aiff",FTW_AIFF_C*256},
    {"aifc",FTW_AIFF_C*256},
    {"raw",FTW_NH_EB*256},	/* no header big-endian */
    {NULL,-1}
  };
#else
  int *af;
  int fmti;
  struct {
    char *str;
    int fmt;
  } fmtstr[] = {
    {"au",1},
    {"snd",1},
    {NULL,-1}
  };
#endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
激情久久五月天| 中文字幕永久在线不卡| 色噜噜狠狠成人中文综合| 国产乱子伦视频一区二区三区| 日韩精品一二三四| 天天影视色香欲综合网老头| 亚洲精品菠萝久久久久久久| 亚洲精品老司机| 亚洲va欧美va天堂v国产综合| 亚洲国产精品久久久久秋霞影院 | 欧美日韩国产乱码电影| 欧美综合亚洲图片综合区| 日本乱人伦一区| 欧美在线制服丝袜| 欧美男人的天堂一二区| 91精品国产91久久久久久最新毛片| 欧美精品在线观看播放| 日韩免费一区二区| 久久久久国产精品厨房| 日本一区二区三区四区| 亚洲免费观看高清| 午夜精品成人在线视频| 美女视频黄a大片欧美| 国产激情一区二区三区四区| 成人污视频在线观看| 欧美自拍偷拍午夜视频| 日韩免费视频线观看| 国产精品欧美综合在线| 亚洲高清中文字幕| 精品在线播放免费| 91小视频免费观看| 制服丝袜亚洲播放| 国产精品久久久久四虎| 亚洲国产成人av网| 国产一区二区免费视频| 99久久婷婷国产综合精品电影| 色综合视频在线观看| 欧美一区二区三级| 中文字幕不卡的av| 午夜视频一区二区| 成人免费三级在线| 欧美一区二区在线免费观看| 国产精品久久久久影院老司| 日韩高清在线不卡| 色综合天天狠狠| 国产亚洲福利社区一区| 午夜伦理一区二区| 成人成人成人在线视频| 日韩亚洲欧美在线| 亚洲三级久久久| 国产毛片精品视频| 欧美一区二区三区电影| 亚洲欧美成aⅴ人在线观看| 精久久久久久久久久久| 5858s免费视频成人| 亚洲婷婷综合色高清在线| 国产另类ts人妖一区二区| 精品视频1区2区| 亚洲人成精品久久久久久| 久久99精品国产麻豆婷婷| 欧美日韩一区久久| 亚洲同性gay激情无套| 国产成人精品亚洲777人妖| 欧美一区二区三区不卡| 午夜视频在线观看一区二区| 91国产精品成人| 亚洲色图在线看| 91丨porny丨蝌蚪视频| 欧美激情一区二区三区不卡| 激情六月婷婷综合| 欧美一区二区三区在线观看视频| 亚洲另类在线视频| 91在线观看高清| 一区在线中文字幕| 不卡的av电影在线观看| 中文字幕一区二区三| 99久久伊人网影院| 亚洲欧美自拍偷拍| 波多野结衣视频一区| 国产精品电影一区二区| www.欧美色图| 亚洲女与黑人做爰| 欧美日韩一区二区在线视频| 亚洲影院久久精品| 在线成人免费观看| 蜜桃av一区二区| 久久婷婷色综合| 顶级嫩模精品视频在线看| 国产日产欧美一区| 99久久精品国产导航| 亚洲麻豆国产自偷在线| 欧美优质美女网站| 日韩黄色小视频| 精品播放一区二区| 成人小视频免费在线观看| 久久久777精品电影网影网| 波多野结衣在线一区| 一区二区三区四区五区视频在线观看 | 欧美性视频一区二区三区| 亚洲高清在线视频| 日韩精品中午字幕| av在线播放一区二区三区| 亚洲精品国产一区二区三区四区在线 | 成人福利电影精品一区二区在线观看 | 蜜桃av噜噜一区二区三区小说| 久久女同性恋中文字幕| 91在线观看高清| 日韩精品电影一区亚洲| 久久精品一区二区三区不卡| 不卡视频一二三四| 视频在线在亚洲| 欧美激情综合五月色丁香 | 蜜桃传媒麻豆第一区在线观看| 久久综合久久综合九色| 99re在线精品| 久久99精品久久久| 一区二区三区在线免费播放| 欧美成人精品1314www| 一本色道久久综合亚洲aⅴ蜜桃| 日韩中文字幕一区二区三区| 国产丝袜在线精品| 91精品久久久久久蜜臀| 成人白浆超碰人人人人| 久久狠狠亚洲综合| 亚洲另类春色校园小说| 国产亚洲一区字幕| 91麻豆精品国产91久久久资源速度| 国产成人精品1024| 青娱乐精品视频在线| 自拍偷拍亚洲激情| 精品国免费一区二区三区| 欧美视频在线播放| 色综合中文字幕国产 | 欧美主播一区二区三区| 国产精品资源在线看| 日韩一区精品视频| 夜夜亚洲天天久久| 中文字幕中文字幕一区二区| 久久伊人蜜桃av一区二区| 在线不卡一区二区| 欧洲av一区二区嗯嗯嗯啊| 成人教育av在线| 国产一区二区三区日韩| 美女国产一区二区三区| 日韩精品色哟哟| 五月婷婷久久丁香| 一区二区日韩av| 亚洲男人的天堂一区二区| 国产精品九色蝌蚪自拍| 国产日韩欧美激情| 久久久精品欧美丰满| 精品99999| 精品成人一区二区三区| 久久影视一区二区| 久久精品一级爱片| 国产亚洲精品资源在线26u| 精品国产免费视频| 亚洲精品一区二区三区在线观看 | 欧美亚洲免费在线一区| 不卡av在线免费观看| 91污片在线观看| 色美美综合视频| 日本高清视频一区二区| 欧美在线一二三| 欧美日韩成人在线| 欧美日韩久久久| 日韩视频免费观看高清完整版| 欧美一级黄色录像| 26uuu国产一区二区三区| 国产人成一区二区三区影院| 国产精品国产三级国产普通话99 | 韩国毛片一区二区三区| 久久99国产精品免费网站| 国产一区欧美一区| 福利电影一区二区三区| 9人人澡人人爽人人精品| 色噜噜狠狠色综合中国| 欧美高清www午色夜在线视频| 欧美xxxx老人做受| 中文字幕在线视频一区| 一区二区三区精密机械公司| 日韩精品免费专区| 精品午夜久久福利影院| 成人免费视频app| 欧美精品一二三| 久久久久国产精品麻豆| 夜夜嗨av一区二区三区网页| 日本成人在线电影网| 国产高清久久久| 欧美日韩在线精品一区二区三区激情 | 在线观看国产一区二区| 欧美mv日韩mv| 亚洲一区二区中文在线| 韩国午夜理伦三级不卡影院| 91在线国产福利| 久久久久久久久99精品| 亚洲福利视频一区二区| 大美女一区二区三区| 欧美男女性生活在线直播观看| 中文字幕的久久|