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

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

?? rebuffer.template

?? The Audio File Library provides a uniform programming interface to standard digital audio file form
?? TEMPLATE
?? 第 1 頁 / 共 2 頁
字號:
/*	rebuffer.template -- this is a TEMPLATE for a rebuffer module	since C has no templates I use this method to get a type-independent	rebuffering module.  This avoids enormous amounts of duplicated code.	to use this file, #include it with the following tokens defined:	#define PRFX(word) XXXX ## word	#define INITFUNC(word) initXXXX ## word	#define NAMESTRING(word) "XXXX" #word	#define TYPE YYYY	where XXXX is replaced with the prefix you want for the module	name and YYYY is replaced with the type the routine works with.	All the other stuff above stays the same.  Here is an example:	#define PRFX(word) int2 ## word	#define INITFUNC(word) initint2 ## word	#define NAMESTRING(word) "int2" #word	#define TYPE signed short int	#include "rebuffer.template"	I would just have you set two variables and do the above myself,	but the C preprocessor is so brain dead that it does not evaluate	actual arguments to preprocessor functions until after they are	substituted in! (and thus concatenated, and thus unable to be	substituted).	The alternative to this (other than to use C++, which would make this	whole damn library so much easier to write and to read) is to have	large numbers of almost identical copies of the rebuffering routines	with a few type fields different.  This is to be avoided.	This code will then define a module called (using above example)	int2rebufferv2f and another called int2rebufferf2v.*//* instance data of rebuffering modules */typedef struct PRFX(rebuffer_data){	bool multiple_of;	/* TRUE=buffer to multiple-of not exactly... */	AFframecount nsamps;	/* # of fixed samples / multiple-of */	TYPE *buf;		/* buf of nsamps samples */	long offset;		/* see code for meaning */	bool eof;		/* (pull only) end of input stream reached */	bool sent_short_chunk;	/* (pull only) end of output stream indicated */	TYPE *saved_buf;	/* (push only) saved buffer */	long saved_offset;	/* (push only) saved buffer offset */} PRFX(rebuffer_data);#define REBUFFER_DATA PRFX(rebuffer_data)/* REBUFFER variable to fixed -- PUSH ONLY */static void PRFX(rebufferv2fmax_push)(struct _AFmoduleinst *i){  REBUFFER_DATA *d = i->modspec;  int nframes = d->nsamps/i->inc->f.channelCount;  if (d->multiple_of)    /* actually, it can be less, but this is ok */    i->outc->nframes = i->inc->nframes + nframes;  else    i->outc->nframes = nframes;}static void PRFX(rebufferv2frun_push)(struct _AFmoduleinst *i){  REBUFFER_DATA *d = i->modspec;  long samples2push = i->inc->nframes * i->inc->f.channelCount;  TYPE *inbufp = i->inc->buf;  /* d->offset could be from 0 to nsamps. 0 is no saved samples,     nsamps is all saved samples (should never be nsamps though)     offset thus contains a count of the valid data samples */  assert(d->offset >= 0 && d->offset < d->nsamps);  /* check that we will be able to push even one block */  if (d->offset + samples2push >= d->nsamps)    {      /* push the currently buffered samples through */      if (d->offset != 0)        memcpy(i->outc->buf, d->buf, sizeof(TYPE)*d->offset);      if (d->multiple_of)        {          /* round down to nearest d->nsamps */          int n = (((d->offset+samples2push) / d->nsamps) * d->nsamps);          /*             Example with d->nsamps==5, d->offset==3, and samples2push=10.             B=a buffered sample             N=a new sample (pushed into module on this call)             Note that we group samples in groups of d->nsamps since they must             be pushed that way (any # of groups at a time):              offset  samples2push                 |-||------------|                 BBBNN  NNNNN  NNN....                    |-------|                     n-offset                 |----------|                       n             n is the number of samples we will push on this run.  What's             left over (3 samples in this case) will get buffered for use             in the next run.          */          assert(n > d->offset);          memcpy((TYPE *)i->outc->buf + d->offset, inbufp,                 sizeof(TYPE)*(n - d->offset)); /* fill in rest of outbuf */          _AFpush(i, n / i->outc->f.channelCount);          inbufp += n - d->offset;          samples2push -= n - d->offset;          assert(samples2push >= 0);          d->offset = 0;        /* the buffer is now empty */        }      else        {          while (d->offset + samples2push >= d->nsamps)            {              int n = d->nsamps - d->offset;              /*                 Same example as above.  Everything is the same except now                 we can only push one group of d->nsamps samples at a time,                 so we must loop through groups, and n takes on several                 values:                    offset  samples2push                       |-||------------|                       BBBNN  NNNNN  NNN....                          ||  |---|                           n    n                 n says how many samples to take from the input chunk.                 n first has the value d->nsamps - d->offset, and then it                 always has the value d->nsamps.              */              memcpy((TYPE *)i->outc->buf + d->offset, inbufp,                     sizeof(TYPE)*n); /* fill in rest of outbuf */              _AFpush(i, d->nsamps / i->outc->f.channelCount);              inbufp += n;              samples2push -= n;              assert(samples2push >= 0);              d->offset = 0;                /* clear out the buffer */            }        }      /* if we pushed blocks, then we must have used all stored samples */      assert(d->offset == 0);    }  /* at this point: guaranteed that  d->offset + samples2push < d->nsamps */  assert(d->offset + samples2push < d->nsamps);  /* save remaining samples in buffer */  if ( samples2push != 0 )    {      memcpy(d->buf+d->offset, inbufp, sizeof(TYPE)*samples2push);      d->offset += samples2push;    }  assert(d->offset >= 0 && d->offset < d->nsamps);}static void PRFX(rebufferv2fsync1)(struct _AFmoduleinst *i){  REBUFFER_DATA *d = i->modspec;  assert(d->offset >= 0 && d->offset < d->nsamps);  /*    save all the samples and the offset so we can     restore our state later.  */  memcpy(d->saved_buf, d->buf, sizeof(TYPE)*d->nsamps);  d->saved_offset = d->offset;}static void PRFX(rebufferv2fsync2)(struct _AFmoduleinst *i){  REBUFFER_DATA *d = i->modspec;  /* d->offset could be from 0 to nsamps. 0 is no saved samples,     nsamps is all saved samples (should never be nsamps though)     offset thus contains a count of the valid data samples */  assert(d->offset >= 0 && d->offset < d->nsamps);  /*     push the currently buffered samples through--even if there     are none!     in other words, push a SHORT CHUNK -- see modules.c TOF for more info !  */  if (d->offset != 0)    {      memcpy(i->outc->buf, d->buf, sizeof(TYPE)*d->offset);    }  _AFpush(i, d->offset / i->outc->f.channelCount); /* SHORT CHUNK */  /* restore state saved in sync1 */  memcpy(d->buf, d->saved_buf, sizeof(TYPE)*d->nsamps);  d->offset = d->saved_offset;  assert(d->offset >= 0 && d->offset < d->nsamps);}static void PRFX(rebufferv2ffree)(struct _AFmoduleinst *i){  REBUFFER_DATA *d = i->modspec;  if (d->buf)    free(d->buf);  if (d->saved_buf)    free(d->saved_buf);}static _AFmodule PRFX(rebufferv2f) ={  NAMESTRING(rebufferv2f),  AF_NULL,  AF_NULL, PRFX(rebufferv2fmax_push),  AF_NULL, AF_NULL, AF_NULL,  PRFX(rebufferv2frun_push), PRFX(rebufferv2fsync1), PRFX(rebufferv2fsync2),  AF_NULL,  PRFX(rebufferv2ffree)};_AFmoduleinst INITFUNC(rebufferv2f)(AFframecount nsamps, bool multiple_of){  _AFmoduleinst ret = _AFnewmodinst(&PRFX(rebufferv2f));  REBUFFER_DATA *d = _af_malloc(sizeof (REBUFFER_DATA));  d->nsamps = nsamps;  d->offset = 0;  d->buf = _af_malloc(sizeof (TYPE) * nsamps);  d->multiple_of = multiple_of;  d->saved_buf = _af_malloc(sizeof (TYPE) * nsamps);  ret.modspec = d;  DEBG(printf("%s nsamps=%d multiple_of=%d\n", NAMESTRING(rebufferv2f),              nsamps, multiple_of));  return(ret);}/* ===== REBUFFER fixed to variable -- PULL ONLY */static void PRFX(rebufferf2vmax_pull)(struct _AFmoduleinst *i){  REBUFFER_DATA *d = i->modspec;  long nframes = d->nsamps / i->inc->f.channelCount;  if (d->multiple_of)    /* actually, it can be less, but this is ok */    i->inc->nframes = i->outc->nframes + nframes;  else    i->inc->nframes = nframes;}static void PRFX(rebufferf2vrun_pull)(struct _AFmoduleinst *i){  REBUFFER_DATA *d = i->modspec;  long samples2pull = i->outc->nframes * i->outc->f.channelCount;  TYPE *outbufp = i->outc->buf;  /* d->offset could be from 0 to nsamps. 0=saved all samples,     nsamps=saved no samples (should never be 0 though)

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本一二三不卡| 亚洲国产一二三| 亚洲尤物视频在线| 激情综合网最新| 色琪琪一区二区三区亚洲区| 这里只有精品免费| 亚洲人吸女人奶水| 国产一区二区不卡在线| 欧美日韩久久一区| 亚洲成人自拍一区| 91精品视频网| 秋霞午夜鲁丝一区二区老狼| 亚洲精品乱码久久久久久日本蜜臀| 日韩一区二区视频| 亚洲精品国久久99热| 丁香婷婷综合色啪| 精品国精品国产| 奇米综合一区二区三区精品视频| 日本乱码高清不卡字幕| 中文字幕制服丝袜一区二区三区| 久久丁香综合五月国产三级网站 | 黑人巨大精品欧美黑白配亚洲| 91久久精品一区二区| 国产精品国产馆在线真实露脸 | 一区二区三区不卡视频 | 加勒比av一区二区| 国产色综合久久| 久久91精品久久久久久秒播 | av资源网一区| 国产精品美女久久久久aⅴ| 国产又粗又猛又爽又黄91精品| 欧美精品自拍偷拍| 五月婷婷激情综合| 在线不卡a资源高清| 午夜成人免费视频| 欧美一区二区三区男人的天堂| 五月综合激情网| 日韩欧美一区二区三区在线| 久久er99热精品一区二区| 日韩精品资源二区在线| 久久精品噜噜噜成人88aⅴ| 精品粉嫩超白一线天av| 国产电影精品久久禁18| 中文字幕欧美激情| 一本一道综合狠狠老| 亚洲一区二区成人在线观看| 欧美日韩在线一区二区| 美女国产一区二区| 久久久不卡影院| 99视频在线观看一区三区| 亚洲你懂的在线视频| 在线一区二区观看| 午夜伦欧美伦电影理论片| 日韩欧美在线观看一区二区三区| 九九热在线视频观看这里只有精品| 久久一夜天堂av一区二区三区| 国产91精品在线观看| 一区二区三区日韩欧美| 91精品国产品国语在线不卡| 国产精品伊人色| 亚洲美女屁股眼交| 欧美tk—视频vk| 成人爱爱电影网址| 日日摸夜夜添夜夜添精品视频| 精品国产一区二区精华| 成人av免费网站| 亚洲1区2区3区4区| 国产亚洲污的网站| 欧美男生操女生| 国产成人av电影在线播放| 亚洲制服丝袜av| 欧美成人在线直播| 91小视频在线| 国产做a爰片久久毛片| 亚洲啪啪综合av一区二区三区| 欧美一区二区三区视频免费播放| 国产麻豆一精品一av一免费 | 亚洲国产精品激情在线观看| 在线影视一区二区三区| 中文字幕日本不卡| 色综合久久久久综合| 午夜精品福利视频网站| 欧美国产视频在线| 日韩一级高清毛片| 欧美亚洲国产一区在线观看网站| 久久成人免费电影| 亚洲va韩国va欧美va| 国产精品视频看| 亚洲四区在线观看| 久久久五月婷婷| 欧美理论电影在线| 在线日韩一区二区| 成人av在线一区二区三区| 裸体健美xxxx欧美裸体表演| 一区二区久久久久| 18成人在线观看| 国产亚洲欧美激情| 精品国产青草久久久久福利| 欧美久久久久久久久久| 欧洲精品一区二区三区在线观看| 国产99久久久国产精品免费看| 秋霞影院一区二区| 午夜视频在线观看一区| 一区二区三区不卡在线观看| 中文字幕一区二区三区四区不卡 | 91香蕉视频污| 不卡在线观看av| 丰满少妇久久久久久久| 国产麻豆一精品一av一免费| 经典三级一区二区| 精品一区二区国语对白| 麻豆成人久久精品二区三区小说| 热久久免费视频| 久久精品99国产精品| 久久99国产精品免费| 精品一区二区三区在线播放| 久久99精品视频| 国产一区二区福利视频| 国产激情视频一区二区三区欧美 | 日本一区二区三区在线观看| 久久久久久一二三区| 久久久精品影视| 国产精品网站在线观看| 中文字幕一区日韩精品欧美| 日韩毛片精品高清免费| 夜夜嗨av一区二区三区网页| 亚洲国产成人91porn| 丝袜美腿亚洲综合| 久久成人综合网| 国产精品综合视频| 欧美一区二区视频在线观看2020| 欧洲国内综合视频| 欧美一级一级性生活免费录像| 日韩你懂的在线观看| 久久九九影视网| 国产精品国产三级国产普通话三级 | 丰满少妇久久久久久久| 成人一区二区三区视频在线观看| 99r国产精品| 欧美日韩国产成人在线免费| 日韩一卡二卡三卡四卡| 久久精品一二三| 亚洲综合色成人| 狂野欧美性猛交blacked| 风间由美性色一区二区三区| 欧美亚洲另类激情小说| 精品国产91乱码一区二区三区| 日本一区二区三区国色天香 | 日韩成人av影视| 国产91在线观看| 欧美丰满一区二区免费视频 | 日韩美女视频一区二区| 日韩黄色片在线观看| 国产a精品视频| 欧美精品tushy高清| 久久久亚洲精品一区二区三区| 一区二区三区美女视频| 精品亚洲aⅴ乱码一区二区三区| 成人aa视频在线观看| 欧美一区二区三区免费视频 | 欧美精品一区二区久久婷婷| 中文字幕日韩一区| 美腿丝袜亚洲色图| 91久久香蕉国产日韩欧美9色| 欧美大片在线观看| 一区二区在线观看免费视频播放| 另类小说图片综合网| 在线日韩国产精品| 欧美国产精品v| 精品系列免费在线观看| 欧美日韩极品在线观看一区| 欧美国产国产综合| 久久超碰97人人做人人爱| 欧美视频一区二区三区| 欧美高清在线一区| 精品在线播放午夜| 欧美日韩国产另类不卡| 亚洲精品网站在线观看| 国产宾馆实践打屁股91| 精品久久久久久久久久久久久久久久久 | 国产日韩av一区二区| 奇米色一区二区三区四区| 欧美在线免费观看亚洲| 国产精品久久久久一区| 国产一区二区毛片| 精品三级在线观看| 免费成人结看片| 欧美日韩不卡视频| 亚洲国产日产av| 91影视在线播放| 国产精品成人网| 国产91精品在线观看| 国产亚洲美州欧州综合国| 麻豆国产91在线播放| 91精品国产色综合久久久蜜香臀| 亚洲高清中文字幕| 欧美日韩国产一级片| 亚洲大片精品永久免费| 欧美丝袜丝交足nylons图片| 亚洲综合在线第一页|