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

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

?? gtkanal.c

?? 音頻編碼
?? C
?? 第 1 頁 / 共 4 頁
字號:
/* *	GTK plotting routines source file * *	Copyright (c) 1999 Mark Taylor * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. *//* $Id: gtkanal.c,v 1.35 2005/01/13 18:20:43 bouvigne Exp $ */#ifdef HAVE_CONFIG_H# include <config.h>#endif#include <math.h>#include <gtk/gtk.h>#include <assert.h>#include "main.h"#include "lame.h"#include "lame-analysis.h"#include "get_audio.h"#include "gtkanal.h"#include "gpkplotting.h"/* this file should be removed. The few data items accessed in 'gfc'   should be made accessable by writing a lame_set_variable() function */#include "util.h"#ifdef WITH_DMALLOC#include <dmalloc.h>#endif#ifdef _WIN32#  include <windows.h>#  define msleep(t) Sleep(t)#else#  include <unistd.h>#  define msleep(t) usleep((t) * 1000)#endif/*! Stringify \a x. */#define STR(x)   #x/*! Stringify \a x, perform macro expansion. */#define XSTR(x)  STR(x)#define MP3X_MAJOR_VERSION      0      /* Major version number */#define MP3X_MINOR_VERSION     82      /* Minor version number */#define MP3X_ALPHA_VERSION      0      /* Set number if this is an alpha version, otherwise zero */#define MP3X_BETA_VERSION       0      /* Set number if this is a beta version, otherwise zero */plotting_data *pinfo;plotting_data *pplot;plotting_data Pinfo[NUMPINFO];/* global variables for the state of the system */static gint idle_keepgoing;        /* processing of frames is ON */static gint idle_count_max;   /* number of frames to process before plotting */static gint idle_count;       /* pause & plot when idle_count=idel_count_max */static gint idle_end=0;      /* process all frames, stop at last frame  */static gint idle_back = 0;     /* set when we are displaying the old data */static int mp3done = 0;         /* last frame has been read */static GtkWidget *frameprogress; /* progress bar */ static GtkWidget *framecounter;  /* progress counter */ static int subblock_draw[3] = { 1, 1, 1 };/* main window */GtkWidget *window;/* Backing pixmap for drawing areas */GtkWidget *pcmbox;       /* PCM data plotted here */GtkWidget *winbox;       /* mpg123 synthesis data plotted here */GtkWidget *enerbox[2];   /* spectrum, gr=0,1 plotted here */GtkWidget *mdctbox[2];   /* mdct coefficients gr=0,1 plotted here */GtkWidget *sfbbox[2];    /* scalefactors gr=0,1 plotted here */GtkWidget *headerbox;    /* mpg123 header info shown here */struct gtkinfostruct {  int filetype;           /* input file type 0=WAV, 1=MP3 */  int msflag;             /* toggle between L&R vs M&S PCM data display */  int chflag;             /* toggle between L & R channels */  int kbflag;             /* toggle between wave # and barks */  int flag123;            /* show mpg123 frame info, OR ISO encoder frame info */  double avebits;         /* running average bits per frame */  int approxbits;         /* (approx) bits per frame */  int maxbits;            /* max bits per frame used so far*/  int totemph;            /* total of frames with de-emphasis */  int totms;              /* total frames with ms_stereo */  int totis;              /* total frames with i_stereo */  int totshort;           /* total granules with short blocks */  int totmix;             /* total granules with mixed blocks */  int totpreflag;         /* total granules with preflag */  int pupdate;            /* plot while processing, or only when needed */  int sfblines;           /* plot scalefactor bands in MDCT plot */  int difference;         /* plot original - decoded instead of orig vs. decoded */  int totalframes;} gtkinfo;static lame_global_flags *gfp;lame_internal_flags *gfc;/********************************************************************** * read one frame and encode it  **********************************************************************/int gtkmakeframe(void){  int iread = 0;  static int init=0;  static int mpglag;  static short int  Buffer[2][1152];  short int  mpg123pcm[2][1152];  int ch,j;  int mp3count = 0;  int mp3out = 0;  int channels_out;  char mp3buffer[LAME_MAXMP3BUFFER];  extern plotting_data *mpg123_pinfo;    static int frameNum=0;  int framesize = lame_get_framesize(gfp);  channels_out = (lame_get_mode(gfp)==MONO) ? 1 : 2;  pinfo->frameNum = frameNum;  pinfo->sampfreq = lame_get_out_samplerate ( gfp );  pinfo->framesize= framesize;  pinfo->stereo = channels_out;  /* If the analsys code is enabled, lame will writes data into gfc->pinfo,   * and mpg123 will write data into mpg123_pinfo.  Set these so   * the libraries put this data in the right place: */  gfc->pinfo = pinfo;  mpg123_pinfo = pinfo;  if (input_format == sf_mp1 ||      input_format == sf_mp2 ||      input_format == sf_mp3) {    iread = get_audio16(gfp,Buffer);    /* add a delay of framesize-DECDELAY, which will make the total delay     * exactly one frame, so we can sync MP3 output with WAV input */    for ( ch = 0; ch < channels_out; ch++ ) {      for ( j = 0; j < framesize-DECDELAY; j++ )	pinfo->pcmdata2[ch][j] = pinfo->pcmdata2[ch][j+framesize];      for ( j = 0; j < framesize; j++ ) /*rescale from int to short int */	pinfo->pcmdata2[ch][j+framesize-DECDELAY] = Buffer[ch][j];    }    pinfo->frameNum123 = frameNum-1;    ++frameNum;  }else {    /* feed data to encoder until encoder produces some output */    while (lame_get_frameNum(gfp) == pinfo->frameNum) {            if (!init) {	init=1;	mpglag=1;	lame_decode_init();      }            iread = get_audio16(gfp,Buffer);      if (iread > framesize) {	/* NOTE: frame analyzer requires that we encode one frame 	 * for each pass through this loop.  If lame_encode_buffer()	 * is feed data too quickly, it will sometimes encode multiple frames	 * breaking this loop.	 */	fprintf(stderr,"Warning: get_audio is returning too much data.\n");      }      if (0==iread) break; /* eof */      mp3count=lame_encode_buffer(gfp,Buffer[0],Buffer[1],iread,				  mp3buffer,(int)sizeof(mp3buffer));      assert( !(mp3count > 0 && lame_get_frameNum(gfp) == pinfo->frameNum));      /* not possible to produce mp3 data without encoding at least        * one frame of data which would increment frameNum */    }    frameNum = lame_get_frameNum(gfp);  /* use the internal MP3 frame counter */        /* decode one frame of output */    mp3out=lame_decode1(mp3buffer,mp3count,mpg123pcm[0],mpg123pcm[1]); /* re-synthesis to pcm */    /* mp3out = 0:  need more data to decode */    /* mp3out = -1:  error.  Lets assume 0 pcm output */    /* mp3out = number of samples output */    if (mp3out>0) assert(mp3out==pinfo->framesize);    if (mp3out!=0) {      /* decoded output is for frame pinfo->frameNum123        * add a delay of framesize-DECDELAY, which will make the total delay       * exactly one frame */      pinfo->frameNum123=pinfo->frameNum-mpglag;      for ( ch = 0; ch < pinfo->stereo; ch++ ) {	for ( j = 0; j < pinfo->framesize-DECDELAY; j++ )	  pinfo->pcmdata2[ch][j] = pinfo->pcmdata2[ch][j+pinfo->framesize];	for ( j = 0; j < pinfo->framesize; j++ ) {	  pinfo->pcmdata2[ch][j+pinfo->framesize-DECDELAY] = 	    (mp3out==-1) ? 0 : mpg123pcm[ch][j];	}      }    }else{      if (mpglag == MAXMPGLAG) {	fprintf(stderr,"READ_AHEAD set too low - not enough frame buffering.\n"	       "MP3x display of input and output PCM data out of sync.\n");	fflush(stderr);      }      else mpglag++;       pinfo->frameNum123=-1;  /* no frame output */    }  }  return iread;}void plot_frame(void){  int i,j,n,ch,gr;  gdouble *xcord,*ycord;  gdouble xmx,xmn,ymx,ymn;  double *data,*data2,*data3;  char title2[80];  char label[80],label2[80];  char *title;  plotting_data *pplot1;  plotting_data *pplot2 = NULL;  double en,samp;  int sampindex,version=0;  int barthick;  static int firstcall=1;  static GdkColor *barcolor,*color,*grcolor[2];  static GdkColor yellow,gray,cyan,magenta,orange,pink,red,green,blue,black,oncolor,offcolor;  int blocktype[2][2];  int headbits;  int mode_gr = 2;  /* find the frame where mpg123 produced output coming from input frame   * pinfo.  i.e.:   out_frame + out_frame_lag = input_frame  */  for (i=1; i<=MAXMPGLAG; i++ ) {    if ((pplot-i)->frameNum123 == pplot->frameNum ) {      pplot2 = pplot-i;      break;    }  }  if (i > MAXMPGLAG) {    fprintf(stderr,"input/output pcm syncing problem.  should not happen!\n");    pplot2=pplot-1;  }  /* however, the PCM data is delayed by 528 samples in the encoder filterbanks.   * We added another 1152-528 delay to this so the PCM data is *exactly* one    * frame behind the header & MDCT information */  pplot1 =pplot2 +1;                   /* back one frame for header info, MDCT */  /* allocate these GC's only once */  if (firstcall) {    firstcall=0;    /*    grcolor[0] = &magenta; */    grcolor[0] = &blue;    grcolor[1] = &green;    barcolor = &gray;    setcolor(headerbox,&oncolor,255,0,0);    setcolor(headerbox,&offcolor,175,175,175);    setcolor(pcmbox,&red,255,0,0);    setcolor(pcmbox,&pink,255,0,255);    setcolor(pcmbox,&magenta,255,0,100);    setcolor(pcmbox,&orange,255,127,0);    setcolor(pcmbox,&cyan,0,255,255);    setcolor(pcmbox,&green,0,255,0);    setcolor(pcmbox,&blue,0,0,255);    setcolor(pcmbox,&black,0,0,0);    setcolor(pcmbox,&gray,100,100,100);    setcolor(pcmbox,&yellow,255,255,0);  }  /*******************************************************************   * frame header info   *******************************************************************/  if (pplot1->sampfreq)    samp=pplot1->sampfreq;  else samp=1;  sampindex = SmpFrqIndex((long)samp, &version);  ch = gtkinfo.chflag;    headbits = 32 + ((pplot1->stereo==2) ? 256 : 136);  gtkinfo.approxbits = (pplot1->bitrate*1000*1152.0/samp) - headbits;  sprintf(title2,"%3.1fkHz %ikbs ",samp/1000,pplot1->bitrate);  gtk_text_freeze (GTK_TEXT(headerbox));  gtk_text_backward_delete(GTK_TEXT(headerbox),			    gtk_text_get_length(GTK_TEXT(headerbox)));  gtk_text_set_point(GTK_TEXT(headerbox),0);  gtk_text_insert(GTK_TEXT(headerbox),NULL,&oncolor,NULL,title2, -1);  title = " mono ";  if (2==pplot1->stereo) title = pplot1->js ? " js " : " s ";  gtk_text_insert (GTK_TEXT(headerbox), NULL, &oncolor, NULL,title, -1);  color = pplot1->ms_stereo ? &oncolor : &offcolor ;   gtk_text_insert (GTK_TEXT(headerbox), NULL, color, NULL,"ms ", -1);  color = pplot1->i_stereo ? &oncolor : &offcolor ;   gtk_text_insert (GTK_TEXT(headerbox), NULL, color, NULL,"is ", -1);  color = pplot1->crc ? &oncolor : &offcolor ;   gtk_text_insert (GTK_TEXT(headerbox), NULL, color, NULL,"crc ", -1);  color = pplot1->padding ? &oncolor : &offcolor ;   gtk_text_insert (GTK_TEXT(headerbox), NULL, color, NULL,"pad ", -1);  color = pplot1->emph ? &oncolor : &offcolor ;   gtk_text_insert (GTK_TEXT(headerbox), NULL, color, NULL,"em ", -1);  sprintf(title2,"bv=%i,%i ",pplot1->big_values[0][ch],pplot1->big_values[1][ch]);  gtk_text_insert (GTK_TEXT(headerbox), NULL, &black, NULL,title2, -1);  color = pplot1->scfsi[ch] ? &oncolor : &offcolor ;   sprintf(title2,"scfsi=%i            ",pplot1->scfsi[ch]);  gtk_text_insert (GTK_TEXT(headerbox), NULL, color, NULL,title2, -1);  if (gtkinfo.filetype)     sprintf(title2," mdb=%i %i/NA",pplot1->maindata,pplot1->totbits);  else    sprintf(title2," mdb=%i   %i/%i",	  pplot1->maindata,pplot1->totbits,pplot1->totbits+pplot->resvsize);  gtk_text_insert (GTK_TEXT(headerbox), NULL, &oncolor, NULL,title2, -1);  gtk_text_thaw (GTK_TEXT(headerbox));  /*******************************************************************   * block type   *******************************************************************/  for (gr = 0 ; gr < mode_gr ; gr ++)     if (gtkinfo.flag123)       blocktype[gr][ch]=pplot1->mpg123blocktype[gr][ch];    else blocktype[gr][ch]=pplot->blocktype[gr][ch];     /*******************************************************************   * draw the PCM data *   *******************************************************************/  n = 1600;  /* PCM frame + FFT window:   224 + 1152 + 224  */  xcord = g_malloc(n*sizeof(gdouble));  ycord = g_malloc(n*sizeof(gdouble));  if (gtkinfo.msflag)     title=ch ? "Side Channel" :  "Mid Channel";  else     title=ch ? "Right Channel" : "Left Channel";  sprintf(title2,"%s  mask_ratio=%3.2f  %3.2f  ener_ratio=%3.2f  %3.2f",	  title,	  pplot->ms_ratio[0],pplot->ms_ratio[1],	  pplot->ms_ener_ratio[0],pplot->ms_ener_ratio[1]);  ymn = -32767 ;   ymx =  32767;  xmn = 0;  xmx = 1600-1;  /*  0  ... 224      draw in black, connecting to 224 pixel   * 1375 .. 1599     draw in black  connecting to 1375 pixel   * 224 ... 1375     MP3 frame.  draw in blue   */  /* draw the title */  gpk_graph_draw(pcmbox,0,xcord,ycord,xmn,ymn,xmx,ymx,1,title2,		 &black);  /* draw some hash marks dividing the frames */  ycord[0] = ymx*.8;  ycord[1] = ymn*.8;  for (gr=0 ; gr<=2; gr++) {    xcord[0] = 223.5 + gr*576;   xcord[1] = 223.5 +gr*576;  

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美午夜精品久久久久久孕妇| 91原创在线视频| 视频一区在线视频| 亚洲成人激情综合网| 日本欧美大码aⅴ在线播放| 婷婷中文字幕一区三区| 成人免费毛片aaaaa**| 五月激情六月综合| 亚洲欧美激情一区二区| 亚洲黄色性网站| 亚洲日本在线天堂| 在线观看成人小视频| 亚洲3atv精品一区二区三区| 欧美日韩中文另类| 日本aⅴ亚洲精品中文乱码| 日韩欧美中文字幕制服| 风间由美性色一区二区三区| 亚洲精品亚洲人成人网| 欧美日韩视频专区在线播放| 日日嗨av一区二区三区四区| 久久免费的精品国产v∧| 成人精品在线视频观看| 午夜精品aaa| 国产亚洲视频系列| 在线观看91精品国产入口| 日韩不卡在线观看日韩不卡视频| 久久久久久久久久久久久夜| 91亚洲午夜精品久久久久久| 午夜精品免费在线观看| 久久久久国产精品厨房| 欧美视频在线观看一区二区| 激情成人综合网| 一区二区三区精品视频在线| 久久伊99综合婷婷久久伊| 91高清视频在线| 国产乱码精品一区二区三| 夜夜精品视频一区二区| 久久网站最新地址| 欧美精品v国产精品v日韩精品| 国产盗摄精品一区二区三区在线| 亚洲亚洲精品在线观看| 国产日韩成人精品| 日韩一区二区三区精品视频| 91色九色蝌蚪| 国产精品影视在线| 奇米综合一区二区三区精品视频| 亚洲丝袜自拍清纯另类| www久久久久| 欧美高清视频不卡网| 91在线看国产| 国产成人午夜精品影院观看视频| 午夜精品视频在线观看| 中文字幕综合网| 国产午夜精品理论片a级大结局| 欧美乱熟臀69xxxxxx| 91在线无精精品入口| 成人美女视频在线看| 捆绑调教美女网站视频一区| 亚洲va欧美va人人爽| 悠悠色在线精品| 最新日韩av在线| 中文字幕免费不卡| 精品成人私密视频| 日韩精品一区二区三区swag | 91在线视频官网| 国产99久久久国产精品| 国产精品一区专区| 国产精品夜夜嗨| 精品一区二区在线免费观看| 乱一区二区av| 美洲天堂一区二卡三卡四卡视频| 午夜影院在线观看欧美| 国产中文字幕精品| 久久99精品久久久久婷婷| 免费成人av在线| 美女任你摸久久| 麻豆一区二区三| 精品在线观看免费| 国产真实乱偷精品视频免| 精品一区二区三区影院在线午夜| 久久成人羞羞网站| 国产精品996| 国产激情视频一区二区三区欧美| 国产精品自拍一区| 成人免费观看男女羞羞视频| 懂色av噜噜一区二区三区av| 成人免费毛片aaaaa**| 99riav久久精品riav| 一本久久精品一区二区| 欧美在线视频你懂得| 欧美高清视频不卡网| 日韩美女主播在线视频一区二区三区| 欧美大片顶级少妇| 国产午夜精品福利| 亚洲欧洲一区二区在线播放| 亚洲美女在线一区| 婷婷成人综合网| 九九九久久久精品| 99久久综合国产精品| 色噜噜偷拍精品综合在线| 欧美日韩精品综合在线| 日韩欧美国产综合在线一区二区三区| 亚洲精品在线电影| 亚洲欧洲国产日本综合| 亚洲成人精品一区| 国产精品一区久久久久| 91社区在线播放| 欧美一区中文字幕| 国产免费观看久久| 亚洲午夜精品网| 加勒比av一区二区| 一本到不卡精品视频在线观看| 欧美日韩亚洲综合在线 欧美亚洲特黄一级 | 亚洲伦理在线精品| 蜜臀久久久久久久| 成人看片黄a免费看在线| 欧美三电影在线| 国产亚洲欧美日韩俺去了| 亚洲人成亚洲人成在线观看图片| 日韩精品91亚洲二区在线观看| 国产成人超碰人人澡人人澡| 欧美无乱码久久久免费午夜一区| 日韩美女在线视频| 亚洲主播在线观看| 国产.欧美.日韩| 7777女厕盗摄久久久| 亚洲欧洲另类国产综合| 蜜臀av国产精品久久久久| 91亚洲精品一区二区乱码| 精品美女在线观看| 亚洲一区二区不卡免费| 成人午夜看片网址| 日韩精品在线一区| 亚洲综合免费观看高清完整版 | 日韩一区二区精品在线观看| 中文字幕乱码一区二区免费| 免费美女久久99| 欧美色图第一页| 亚洲欧美怡红院| 国产精品一线二线三线| 日韩欧美中文字幕公布| 亚洲国产一区二区视频| 99久久99久久免费精品蜜臀| 精品国产露脸精彩对白 | 亚洲猫色日本管| 岛国精品在线播放| 久久综合九色综合97_久久久| 亚洲福利视频一区二区| 99在线精品观看| 国产欧美精品国产国产专区| 美女脱光内衣内裤视频久久影院| 欧美吞精做爰啪啪高潮| 亚洲人成伊人成综合网小说| 成人久久久精品乱码一区二区三区| 2017欧美狠狠色| 激情五月激情综合网| 日韩一区二区免费视频| 日韩av在线免费观看不卡| 欧美三片在线视频观看| 一区二区三区日本| 欧洲av在线精品| 一区二区欧美精品| 在线免费不卡电影| 一区二区三区影院| 日本精品免费观看高清观看| 中文字幕一区二区视频| eeuss鲁片一区二区三区在线观看 eeuss鲁片一区二区三区在线看 | 日韩欧美色电影| 免费看欧美美女黄的网站| 欧美一区午夜视频在线观看| 日韩精品电影在线观看| 51午夜精品国产| 麻豆国产精品官网| 精品少妇一区二区三区免费观看| 美腿丝袜亚洲综合| 久久久久国产一区二区三区四区| 国产一区二区0| 国产片一区二区| 不卡视频一二三四| 亚洲理论在线观看| 欧美日韩午夜精品| 免费成人结看片| 欧美激情综合五月色丁香| av电影天堂一区二区在线观看| 亚洲欧美综合网| 欧美影院午夜播放| 日韩va亚洲va欧美va久久| 精品国产91亚洲一区二区三区婷婷| 韩国在线一区二区| 国产精品免费人成网站| 国产日韩欧美综合一区| 国产成人精品一区二区三区四区| 国产精品无人区| 欧美日韩免费观看一区三区| 久国产精品韩国三级视频| 国产欧美日韩另类视频免费观看| 91视频一区二区三区| 亚洲国产精品久久久男人的天堂| 日韩你懂的电影在线观看| 成人一级视频在线观看|