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

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

?? spread.c

?? speech signal process tools
?? C
字號:
#include <stdio.h>#include <sp/sphere.h>#include <string.h>/* *  This function just computes the checksum of the file pointed to by  *  an FOB structure. */int fob_short_checksum(f, checksum, swap_bytes, compute_checksum, add_checksum, success)FOB *f;int swap_bytes;SP_CHECKSUM *checksum, (*compute_checksum)(), (*add_checksum)();{    long cur_fp_pos;    short buff[1024];    int len, ss;    SP_CHECKSUM chks;    chks = *checksum = 0;    ss = sizeof(short);    if (fob_is_fp(f)){	cur_fp_pos = ftell(f->fp);	while ((len=fread(buff,ss,1024,f->fp)) > 0){	    chks = (*compute_checksum)(buff, len, swap_bytes);	    *checksum = (*add_checksum)(*checksum,chks);	}	if (ferror(f->fp)){	    fseek(f->fp,cur_fp_pos,SEEK_SET);	    return(-1);	}	fseek(f->fp,cur_fp_pos,SEEK_SET);	clearerr(f->fp);	return(0);    } else {        *checksum = (*compute_checksum)(f->buf,f->length/2, swap_bytes);	success=0;	return(0);    }}/* * *  sp_read_data() * */int sp_read_data(buffer,sample_size,num_sample,sp)void *buffer;size_t sample_size;size_t num_sample;SP_FILE *sp;{    char *proc_name="sp_read_data";    SP_CHECKSUM checksum;    int ret;        if (sp_verbose > 10) printf("Proc %s:\n",proc_name);    if (buffer == (void *)0) 	return_err(proc_name,100,0,"Null memory buffer");     if (sp == SPNULL)	return_err(proc_name,101,0,"Null SPFILE structure");    if (sp->open_mode != SP_mode_read) 	return_err(proc_name,104,104,"Read on a file not opened for read");    if (sample_size != sp->read_spifr->status->user_sample_n_bytes) 	return_err(proc_name,102,0,		   rsprintf("Sample size %d does not match the expected size %d",			    sample_size, sp->read_spifr->status->user_sample_n_bytes));    if (num_sample < 0)	return_err(proc_name,103,0,		   rsprintf("Negative sample count %d",num_sample));    if (sp->read_spifr->waveform->failed_checksum)	return_err(proc_name,1001,0,"Pre-Read Checksum Test Failed");    if (sp->read_spifr->status->read_occured_flag == FALSE) { /* set up the FoB Structure for reading */	sp->read_spifr->status->read_occured_flag = TRUE;	if ((sp->read_spifr->status->user_compress == SP_wc_none) &&	    (sp->read_spifr->status->file_compress != SP_wc_none)){	    int decomp_into_memory=TRUE;	    int wav_bytes=0;	    FOB *fob_in, *fob_out;	    char *buff;	    int blen;	    wav_bytes = sp->read_spifr->status->user_sample_count *    		        sp->read_spifr->status->user_channel_count * 			sp->read_spifr->status->user_sample_n_bytes;	    /* the file must be decompressed, Question: Should it be done in memory?   */	    if (wav_bytes > MAX_INTERNAL_WAVFORM)		decomp_into_memory = FALSE;	    /* The file needs to be de_compressed into memory !!!! */	    /* 1. make an FOB struct for the uncompressed waveform to be read into and */	    /*    the original file */	    /* 2. allocate memory for the entire waveform */	    /* 3. decompress the file */	    /* 4. Clean up the FOB struct for the file, moving the fp from the FOB */	    /* 5. reset the uncompressed FOB struct to the beginning of the memory */			    	    if (decomp_into_memory) {		if (sp_verbose > 15) printf("Proc %s: Pre-buffering compressed data into memory\n",proc_name);		if (fob_create2(sp->read_spifr->waveform->sp_fp, FPNULL, &fob_in, &fob_out) < 0)		    return_err(proc_name,200,0,"Unable to setup for decompression");		blen = sp->read_spifr->status->file_channel_count * sp->read_spifr->status->file_sample_count * 		    sp->read_spifr->status->file_sample_n_bytes;		if ((buff=mtrf_malloc(blen)) == CNULL){		    fob_destroy(fob_in);		    fob_destroy(fob_out);		    return_err(proc_name,201,0,"Unable to malloc memory to decompress into");		}		fob_bufinit(fob_out, buff, blen);	    } else { /* decompress into a disk file */		FILE *temp_fp;		if (sp_verbose > 15) printf("Proc %s: Pre-buffering compressed data into a temporary file\n",proc_name);		sp->read_spifr->status->temp_filename = sptemp_dirfile();		if (sp->read_spifr->status->temp_filename == CNULL)		    return_err(proc_name,400,0,"Unable to create usable temporary file");		if (sp_verbose > 15) printf("Proc %s: Attempting to read a big file %d bytes long, using temp file %s\n",proc_name,					   wav_bytes,sp->read_spifr->status->temp_filename);		if ((temp_fp=fopen(sp->read_spifr->status->temp_filename,TRUNCATE_UPDATEMODE)) == FPNULL) 		    return_err(proc_name,401,0,			       rsprintf("Unable to open temporary file %s",sp->read_spifr->status->temp_filename));		if (fob_create2(sp->read_spifr->waveform->sp_fp, temp_fp, &fob_in, &fob_out) < 0)		    return_err(proc_name,402,0,"Unable to setup for decompression");		sp->read_spifr->waveform->sp_fp = FPNULL;		sp->read_spifr->status->is_temp_file = TRUE;	    }	    switch (sp->read_spifr->status->file_compress){	      case SP_wc_shorten:		if (sp_verbose > 15) printf("Proc %s: Executing Shorten Decompression\n",proc_name);		if (shorten_uncompress(fob_in, fob_out) < 0){		    fob_destroy(fob_in);		    fob_destroy(fob_out);		    return_err(proc_name,202,0,"Shorten Decompression Failed");		}		break;	      case SP_wc_wavpack:		if (sp_verbose > 15) printf("Proc %s: Executing Wavpack Decompression\n",proc_name);		if (wavpack_unpack(fob_in, fob_out) < 0){		    fob_destroy(fob_in);		    fob_destroy(fob_out);		    return_err(proc_name,203,0,"Wavpack Decompression Failed");		}		break;	      case SP_wc_shortpack:		if (sp_verbose > 15) printf("Proc %s: Executing Shortpack Decompression\n",proc_name);		if (shortpack_uncompress(fob_in, fob_out, sp->read_spifr->status->file_header) < 0){		    fob_destroy(fob_in);		    fob_destroy(fob_out);		    return_err(proc_name,203,0,"Shortpack Decompression Failed");		}		break;	      default:		return_err(proc_name,205,0,"Unable to decompress the requested format\n");	    }	    fob_rewind(fob_out);	    fob_destroy(fob_in);	    	    	    sp->read_spifr->waveform->sp_fob = fob_out;	}	else {	    /* The following code assumes that no pre-bufferring is needed */	    if ((sp->read_spifr->waveform->sp_fob = fob_create(sp->read_spifr->waveform->sp_fp)) == FOBPNULL)		return_err(proc_name,300,0,"Unable to allocate a FOB (File or Buffer) structure");	    sp->read_spifr->waveform->sp_fp = FPNULL;	}	/****************************************************/	/**            INVARIANT ASSERTION:                **/	/** The data is now in it's natural (decomp) form  **/	/****************************************************/	/************ Set up the file conversions ***********/	/* Set up byte format the conversions */	if (sp->read_spifr->status->user_sbf != sp->read_spifr->status->file_sbf) 	    if (((sp->read_spifr->status->user_sbf == SP_sbf_01) &&		 (sp->read_spifr->status->file_sbf == SP_sbf_10)) ||		((sp->read_spifr->status->user_sbf == SP_sbf_10) &&		 (sp->read_spifr->status->file_sbf == SP_sbf_01)))		fob_read_byte_swap(sp->read_spifr->waveform->sp_fob);	if (sp->read_spifr->status->user_encoding != sp->read_spifr->status->file_encoding)	    return_err(proc_name,400,0,"Unable to convert sample types ... for now\n");	/* pre-verify the waveform data */	if (sp->read_spifr->status->extra_checksum_verify){	    /* if the samples are in memory, compute the checksum from there. */	    /* if not, read in the file, a block at a time and compute the    */	    /* checksum.                                                      */	    switch (sp->read_spifr->status->file_encoding){	      case SP_se_pcm2:		if (fob_short_checksum(sp->read_spifr->waveform->sp_fob, &checksum,				       sp->read_spifr->status->file_sbf != sp->read_spifr->status->natural_sbf,				       sp_compute_short_checksum,				       sp_add_checksum) < 0){		    return_err(proc_name,501,0,"Unable to Pre-Verify Checksum");		}		if (checksum != sp->read_spifr->status->file_checksum){		    sp->read_spifr->waveform->failed_checksum = TRUE;		    return_err(proc_name,1001,0,"Pre-Read Checksum Test Failed");		}		break;	      default:		break;	    }	}    }    if (sp_verbose > 15) printf("Proc %s: current file position %d\n",proc_name,				fob_ftell(sp->read_spifr->waveform->sp_fob));    /* READ THE DATA INTO THE BUFFER */    ret = fob_fread(buffer, sample_size, num_sample, sp->read_spifr->waveform->sp_fob);    if (ret < 0)	return_err(proc_name,105,0,"Unable to read data");    /* Perform the checksum computation */    switch (sp->read_spifr->status->user_encoding){      case SP_se_pcm2:	if (sp->read_spifr->status->natural_sbf == sp->read_spifr->status->user_sbf)	    checksum = sp_compute_short_checksum(buffer, ret, FALSE);	else	    checksum = sp_compute_short_checksum(buffer, ret, TRUE);		sp->read_spifr->waveform->checksum = 	    sp_add_checksum(sp->read_spifr->waveform->checksum,checksum);	sp->read_spifr->waveform->samples_read += ret;	if (sp_eof(sp))	    if (sp->read_spifr->waveform->samples_read != sp->read_spifr->status->user_sample_count){		sp->read_spifr->waveform->read_premature_eof = TRUE;		return_err(proc_name,500,0,"Premature End-of_File");	    }	if (sp->read_spifr->waveform->samples_read == sp->read_spifr->status->user_sample_count){	    if ((! sp->read_spifr->status->ignore_checksum) &&		(sp->read_spifr->waveform->checksum != sp->read_spifr->status->file_checksum)){		sp->read_spifr->waveform->failed_checksum = TRUE;	    		return_err(proc_name,1000,0,"Checksum Test Failed");	    }	}	break;      default:	break;    }    if (sp_verbose > 11) printf("Proc %s: Requested %d, %d byte samples, got %d\n",proc_name,num_sample,sample_size,ret);    return_success(proc_name,0,ret,"ok");}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
青青草原综合久久大伊人精品 | 亚洲日本电影在线| 国产午夜精品福利| 亚洲免费在线视频一区 二区| 欧美国产日韩一二三区| 亚洲永久免费视频| 国产一区二区女| 色综合久久精品| 欧美不卡视频一区| 亚洲同性同志一二三专区| 亚洲精品国产a久久久久久| 国精产品一区一区三区mba视频 | 欧美电影免费观看完整版| 欧美一区中文字幕| 亚洲愉拍自拍另类高清精品| 国产精品中文字幕日韩精品| 欧美久久婷婷综合色| 亚洲私人影院在线观看| 国产一区二区三区电影在线观看| 91国偷自产一区二区开放时间| 欧美一区二区三区成人| 一区二区三区精品视频在线| 成人白浆超碰人人人人| 欧美精品一区二区在线播放| 蜜臀av性久久久久蜜臀aⅴ四虎| 成人国产免费视频| 成人免费一区二区三区在线观看| 国产精品123区| 中文成人综合网| 国产成人综合在线| 国产欧美日韩综合| 97久久超碰国产精品| 亚洲乱码国产乱码精品精小说 | 免费高清在线视频一区·| 欧美老肥妇做.爰bbww视频| 又紧又大又爽精品一区二区| 欧美最新大片在线看| 日精品一区二区| 久久久亚洲国产美女国产盗摄| 成人黄色免费短视频| 亚洲精品中文在线观看| 欧美日韩国产首页| 精品在线视频一区| 亚洲男女一区二区三区| 日韩精品一区二区三区四区 | 欧美精品久久久久久久多人混战| 免费成人av资源网| 日本一区二区三区四区| 911精品国产一区二区在线| 成人黄色电影在线| 免费看欧美美女黄的网站| 国产精品女主播av| 欧美电视剧在线看免费| 欧美无砖砖区免费| 色噜噜夜夜夜综合网| 国产美女精品人人做人人爽| 免费观看在线色综合| 亚洲三级在线看| 中文字幕亚洲综合久久菠萝蜜| 6080yy午夜一二三区久久| 欧日韩精品视频| 中文字幕一区不卡| 日韩美一区二区三区| 91视频免费播放| 欧美私模裸体表演在线观看| 在线精品亚洲一区二区不卡| av网站一区二区三区| av中文字幕在线不卡| 在线视频中文字幕一区二区| av电影天堂一区二区在线| 不卡在线视频中文字幕| 97久久精品人人爽人人爽蜜臀| 中文字幕中文乱码欧美一区二区| 成人午夜激情片| 日本美女一区二区三区视频| 亚洲18女电影在线观看| 日韩国产精品大片| 国产精品一区二区久久精品爱涩| 国产一区二区三区在线看麻豆| 国产精品一区在线观看你懂的| av激情综合网| 欧美另类高清zo欧美| 久久亚区不卡日本| 亚洲人成网站影音先锋播放| 五月激情六月综合| 粉嫩嫩av羞羞动漫久久久| 一本到高清视频免费精品| 在线91免费看| 综合激情成人伊人| 蜜桃av噜噜一区| 99精品国产热久久91蜜凸| 日韩手机在线导航| 亚洲女厕所小便bbb| 国产在线精品一区在线观看麻豆| 欧美亚洲综合另类| 国产精品视频你懂的| 国内精品视频666| 欧美一区二区三区四区五区| 亚洲精品福利视频网站| www.亚洲免费av| 国产三级精品视频| 精油按摩中文字幕久久| 欧美精品一区二区三区蜜臀| 蜜桃一区二区三区在线| 欧美精品九九99久久| 日韩制服丝袜av| 精品1区2区3区| 人人超碰91尤物精品国产| 7777精品伊人久久久大香线蕉 | 欧美成人伊人久久综合网| 一区二区三区中文字幕精品精品 | 中文字幕亚洲在| 色综合久久久网| 亚洲激情自拍视频| 欧美在线观看视频在线| 一区二区三区四区中文字幕| 成人a级免费电影| 99精品欧美一区| 五月激情丁香一区二区三区| 91精品国产免费久久综合| 国产综合色视频| 亚洲一区精品在线| 欧美精品 日韩| 成人一区二区三区中文字幕| 日韩理论电影院| 日韩精品一区二区三区在线观看| 国产成人在线看| 亚洲一区在线观看视频| 国产午夜精品一区二区三区视频| 91麻豆.com| 成人在线一区二区三区| 亚洲精品高清在线| 亚洲午夜激情网页| 亚洲国产激情av| 日韩女优av电影| 欧美色视频一区| 色狠狠av一区二区三区| 国产成人在线网站| 国产一区二区三区黄视频 | 久久综合五月天婷婷伊人| 一本色道综合亚洲| 色综合天天综合网国产成人综合天| 精品一区二区三区在线视频| 天堂成人国产精品一区| 一个色综合av| 亚洲福利一区二区三区| 精品处破学生在线二十三| av在线不卡网| 欧美私模裸体表演在线观看| 在线视频一区二区三| 欧美中文字幕一区二区三区 | 欧美日韩一区中文字幕| 精品污污网站免费看| 欧美群妇大交群中文字幕| 欧美一区二区视频免费观看| 精品理论电影在线观看| 亚洲精品在线电影| 国产精品国产成人国产三级 | 婷婷一区二区三区| 中文字幕日本不卡| 国产精品大尺度| 久久精品亚洲麻豆av一区二区 | 在线综合+亚洲+欧美中文字幕| 欧美在线观看视频一区二区| 91精品国产乱| 亚洲欧美一区二区三区极速播放| 亚洲精品高清在线观看| 狠狠色丁香九九婷婷综合五月| 99久久99精品久久久久久| 欧美日本在线视频| 国产亚洲人成网站| 国产精品日韩成人| 亚洲女厕所小便bbb| 国产福利视频一区二区三区| 成av人片一区二区| 久久精品视频一区| 日产国产高清一区二区三区| 色婷婷av一区| 国产欧美精品一区二区色综合朱莉| 午夜激情一区二区| 在线一区二区视频| 亚洲精品第1页| 欧美综合亚洲图片综合区| 亚洲天堂免费在线观看视频| 国产一区美女在线| 国产精品色在线| 91在线观看视频| 欧美国产一区二区在线观看| 国产91精品一区二区麻豆亚洲| 7799精品视频| 国产一区二区福利视频| 中文字幕国产精品一区二区| 91麻豆国产在线观看| 三级不卡在线观看| 欧美精品一区二区三区在线| 成人免费不卡视频| 亚洲成人综合视频| 国产日韩精品一区二区三区在线| 不卡视频一二三| 亚洲尤物在线视频观看|