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

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

?? dp_call.c

?? 話帶數據中傳真解調程序
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* * Call handling stuff, mostly to do with dialling. * * Copyright 1999 Pavel Machek * Copyright 1999 Jamie Lokier * Copyright 1999 R.J.M. Close * * Can be distributed under GPL */#include "dp_call.h"void dp_DTMF_dial_cmd (unsigned char digit){  dp_write_dsp_ram (0x17, S_DTMF_dial_speed);  dp_write_dsp_ram (0x18, S_DTMF_dial_speed);  //PRINTF ("dial_speed = %d\n", S_DTMF_dial_speed);  if (cell_active)    {      dp_write_dsp_ram (0x11, 5 + H_DTMF_high_tone_level_ndB);      dp_write_dsp_ram (0x12, 5 + H_DTMF_high_tone_level_ndB			+ H_DTMF_high_low_tone_level_difference_dB);    }  else    {      dp_write_dsp_ram (0x11, H_DTMF_high_tone_level_ndB);      dp_write_dsp_ram (0x12, H_DTMF_high_tone_level_ndB			+ H_DTMF_high_low_tone_level_difference_dB);    }  dp_modem_command (0x0a, digit, 0);}// Pulse dial!void dp_pulse_dial_cmd(int arg){  int al, bl;  printf( "Dialing %d: ", arg );  al = homol[1];  bl = homol[2];  if (1 /* byte_59E6E & 0x40 */) {    al >>= 1;    bl = 0x32;    bl -= al;  }  dp_write_dsp_ram(0x19, al);  dp_write_dsp_ram(0x1a, bl);  dp_write_dsp_ram(0x1b, (1 ? 0x384 : 0x2f3 ));  dp_modem_command(0x0b, arg, 0);  printf( "\n" );}void dp_set_lb_filter (void){  unsigned char al, bl;  if (dp_threshold < 0x23)	dp_write_dsp_ram (0x760, dp_threshold + 2);  else	dp_write_dsp_ram (0x760, dp_threshold + 4);  switch (H_dial_tone_or_call_progress_filter) {  case 0:	al = 0;  case 2:	al = 0x20;  case 3:	al = 0x30;  case 4:	al = 0x40;  case 5:	al = 0x50;  case 6:	al = 0x60;  default:	al = 0x10;  }  //if (S(0x40) != 0) // this is set from read_eeprom(1), well dodgy!  //	al = 0x70;  // Yuk, look up table.  // lea esi, loc_iircoef[eax*2], array of unsigned short.  for (bl = 0; bl < 16; bl++) {	// catch any errors as array has 128 elements.	if(al > 128) {	  printf ("dp_set_lb_filter: error: max size of iircoef exceeded!\n");      break;	}	// Write word to DSP.	dp_write_dsp_ram (bl + 0x764, iircoef[al]);	// Point to next word.	al++;  }}// Set up tone detection.void dp_detect_tones_cmd (void){  dp_set_lb_filter();  dp_write_dsp_ram(0x26, H_data_or_fax_answer_detection_threshold_dB);  dp_write_dsp_ram(0x1c, 0x2b9b);  dp_write_dsp_ram(0x1d, 0x11cd);  dp_write_dsp_ram(0x1e, 0x3d0a);  dp_write_dsp_ram(0x1f, 0x3b57);  dp_write_dsp_ram(0x20, 0x0851);  dp_write_dsp_ram(0x21, 0xf190);  dp_write_dsp_ram(0x22, 0xedc8);  dp_write_dsp_ram(0x23, 0xef70);  dp_write_dsp_ram(0x24, 0xe8ce);  dp_write_dsp_ram(0x25, 0xe782);  if (S(0x38) != 0xA)	{	  dp_write_dsp_ram(0x0fc0, 0x172b);	  dp_write_dsp_ram(0x0fc1, 0xf4bc);	  dp_modem_command (8, 0xc, 0);	}  else	dp_modem_command (8, 0xa, 0);    dp_dial_tone_timer = x_current_time();  dp_quiet_answer_timer = x_current_time();  dp_busy_tone_timer = x_current_time();  dp_busy_state = 0;  dp_tone_state = 0;  peak_energy = 0;  peak_busy_energy = 0;}// Detects the dial tone. // Currently doesn't work quite right! Needs tidying up.bool dp_dial_tone_detected (void){  unsigned int eax, ecx;  unsigned int energy1, energy2;  bool state_changed = false;  energy2 = dp_read_dsp_ram(0x354);  energy1 = dp_read_dsp_ram(0x794);  #if LT_DEBUG_TONES  // Diagnostics.  printf    ("dp_dial_tone_detected: dp_tone_state = %d, energy2 = %x, energy1 = %x, peak = %x.\n",     dp_tone_state, energy2, energy1, peak_energy);  //printf ("H_dial_tone_validation_time is %d.\n", H_dial_tone_validation_time);  // normally it is 25.#endif  switch (dp_tone_state){  case 0:    eax = dp_read_dsp_ram(0x3A);    //printf("Read %x from DSP RAM(0x3a).\n", eax); 	if ((eax & 0x1000) != 0) {	  // Reset some stuff and go on to the next phase of tone detection.	  dp_tone_on_time = 0;	  dp_tone_off_time = 0;	  dp_dialtone_cycles = 0;	  dp_tone_timer = x_current_time();	  dp_tone_state = 1;	}  loc_2A989:	// printf ("Reset dp_dial_tone_timer!\n");	dp_dial_tone_timer = x_current_time();	goto loc_2A994;  case 1:    eax = dp_read_dsp_ram (0x3a);#if LT_DEBUG_TONES	// Diagnostics.	printf	  ("dp_dial_tone_detected: dp_read_dsp_ram (0x3a) = %x\n", eax);#endif	//if ((dp_read_dsp_ram (0x3a) & 0x1000) == 0) goto loc_2A8EB;	if ((eax & 0x1000) == 0) goto loc_2A8EB;	if ((unsigned int)(peak_energy / 2) >= energy1) goto loc_2A909;  loc_2A8EB:	dp_tone_on_time = x_elapsed_time(dp_tone_timer);	dp_tone_state = 2;    state_changed = true;  loc_2A909:	if ((country_code != COUNTRY_ITALY)		&& (energy1 > (unsigned int)(peak_energy / 4))		&& ((energy2 / (energy1 + 1)) > 5)) {	  dp_dial_tone_timer = x_current_time();	  peak_energy = energy1;	}	if (energy1 > peak_energy) {	  peak_energy = energy1;	}	goto loc_2A994;  case 2:	goto loc_2A994;  default:	//test	 bp, ax	if (dp_read_dsp_ram (0x3A) & 0x1000) goto loc_2A89C;	eax = peak_energy;	eax = eax / 2;	if (energy1 > eax) {	  eax = x_elapsed_time(dp_tone_timer);printf ("Oh Shit!\n");	  peak_energy = 0;	  dp_tone_off_time = eax;	  dp_tone_state = 1;	  state_changed = true;	  goto loc_2A994;	}	if ((country_code == 7) | (country_code == 8)) goto loc_2A994;	if (x_elapsed_time(dp_tone_timer) > 500) {	  printf ("Reset peak_energy on 500ms timeout!\n");	  peak_energy = energy1;	}	goto loc_2A994;  }loc_2A89C:  eax = x_elapsed_time(dp_tone_timer);  if ((country_code != 8)      && (eax > H_dial_tone_hole_time)) goto loc_2A989;  if (eax <= 1250) goto loc_2A994;  goto loc_2A989;loc_2A994:  if (state_changed == false) goto loc_2AA49;  // State has changed.  // Reset tone timer.  dp_tone_timer = x_current_time();  ecx = H_dial_tone_hole_time;  eax = dp_tone_off_time;  if (eax <= ecx) goto loc_2AA49;    if (country_code !=8) goto loc_2AA3E;  energy2 = 180;  if (eax <= 210) goto loc_2A9D9;  if (eax < 830) goto loc_2AA07;loc_2A9D9:  if (eax < energy2) goto loc_2AA07;  if (eax > 1155) goto loc_2AA07;  ecx = dp_tone_on_time;  if (ecx <= 230) goto loc_2A9F9;  if (ecx <= 530) goto loc_2AA07;loc_2A9F9:  if (ecx < 190) goto loc_2AA07;  if (ecx < 680) goto loc_2AA1F;loc_2AA07:    ecx = dp_tone_on_time;    // printf ("Reset dp_dial_tone_timer!\n");    dp_dial_tone_timer = x_current_time();    eax = dp_tone_off_time;loc_2AA1F:  if (eax <= energy2) goto loc_2AA2A;  if (eax < 220) goto loc_2AA36; loc_2AA2A:  if (ecx <= energy2) goto loc_2AA49;  if (ecx >= 220) goto loc_2AA49;loc_2AA36:  dp_dialtone_cycles++;  goto loc_2AA49;loc_2AA3E:  // printf ("Reset dp_dial_tone_timer!\n");  dp_dial_tone_timer = x_current_time(); loc_2AA49:  // If state is 2 and there hasn't been a state change then this  // is the only code (of interest!) that will be executed.  eax = x_elapsed_time(dp_dial_tone_timer);  // printf ("dp_dial_tone_timer, elapsed time is now: %d\n", eax);  if (eax < (unsigned int)(H_dial_tone_validation_time * 100)) return false;  // *Bodge* dp_read_dsp_ram(0x3A) always seems to return 0x1000.  //if (dp_read_dsp_ram(0x3A) & 0x1000) return false;  if (energy1 <= (unsigned int)(H_dialtone_level * 2) ) return false;  if ((country_code != COUNTRY_ITALY) || (dp_dialtone_cycles <= 2))	return true;  else	return false;}// Returns True if the tone is detected when the call is answered.bool dp_answer_tone_detected(void){#if LT_DEBUG_TONES  // Diagnostics.  printf    (">> dp_answer_tone_detected: answer state = %d, on time = %d, off time = %d.\n",     dp_answer_state, x_elapsed_time(dp_answer_on_timer), x_elapsed_time(dp_answer_off_timer));#endif	  switch(dp_answer_state) {  case 0:	// Initial answer state.	if (dp_read_dsp_ram(0x28) & 0x3f0) {	  dp_answer_on_timer = x_current_time();	  dp_answer_off_timer = x_current_time();	  dp_answer_state = 1;	}	return false;  case 1:	if ((dp_read_dsp_ram(0x28) & 0x3f0) == 0) {	  dp_answer_off_timer = x_current_time();	  dp_answer_state = 2;	  return false; 	}	if ((S(0x6a) == 2) &&		(x_elapsed_time(dp_answer_on_timer) >= 100))	  return true;	//loc_2AB17:		{	  int validationPeriod = (H_answer_tone_validation_time * 10);	  if (x_elapsed_time(dp_answer_on_timer) >= validationPeriod)		return true;	  else		return false;	}  case 2:	if (dp_read_dsp_ram (0x28) & 0x3f0)	  {		if (x_elapsed_time(dp_answer_off_timer) > 50)		  dp_answer_on_timer = x_current_time();		dp_answer_state = 1;	  }	return false;  }  return false;}bool dp_busy_tone_detected (void){  unsigned short energy2 = dp_read_dsp_ram (0x354); // Haven't a clue!  unsigned short energy = dp_read_dsp_ram (0x794);  // This flag causes the dp_busy_tone_timer to be reset and the cadance checked.  bool flag_1 = false;#if LT_DEBUG_TONES  // Diagnostics.  printf    ("dp_busy_tone_detected: busy state = %d, energy2 = %x, energy = %x, peak busy = %x.\n",     dp_busy_state, energy2, energy, peak_busy_energy);	  // Diagnostics.  printf ("on cad = %u, off cad = %u cycles=%u, DSP RAM = %4x\n",		  dp_busy_on_cadence, dp_busy_off_cadence, dp_busy_cycles, dp_read_dsp_ram(0x3a));#endif  switch (dp_busy_state)    {    case 0:      if (ELAPSED_TIME (dp_busy_tone_timer) > 3)		{		  if (dp_read_dsp_ram (0x3a) & 0x1000)			{			  dp_busy_on_cadence = 0;			  dp_busy_off_cadence = 1;			  dp_busy_state = 1;			}		  else			{			  dp_busy_on_cadence = 1;			  dp_busy_off_cadence = 0;			  dp_busy_state = 2;			}		}      break;    case 1:	  if ((dp_read_dsp_ram(0x3a) & 0x1000) == 0) goto loc_2AC11;	  if (energy >= (peak_busy_energy/2)) goto loc_2AC46;	loc_2AC11:	  if (x_elapsed_time(dp_busy_tone_timer) <= 30) goto loc_2AC46;	  dp_busy_on_cadence = x_elapsed_time(dp_busy_tone_timer);	  dp_busy_state = 2;	  //loc_2AC3F:	  flag_1 = true;	  break;	loc_2AC46:	  if ((x_modem_mode != 2) &&		  (S_data_calling_tone == true) &&		  (dp_calling_tone_disable == 0) &&		  (x_elapsed_time(dp_timer1) >= 0x708)) {		dp_busy_on_cadence = x_elapsed_time(dp_busy_tone_timer);		flag_1 = true;	  }	  //loc_2AC87:		  if (energy2 > (energy * 3))		dp_continous_busy_timer = x_current_time ();	  break;    case 2:      if ((dp_read_dsp_ram (0x3a) & 0x1000)		  && (energy > (peak_busy_energy / 2)))		{		  dp_busy_off_cadence = ELAPSED_TIME (dp_busy_tone_timer);		  dp_busy_state = 1;		  flag_1 = true;		}      else		START_TIMER (dp_continuous_busy_timer);      break;    }  //loc_2ACF0:	  if (ELAPSED_TIME (dp_busy_tone_timer) > 900)    {      dp_busy_cycles = 0;      dp_busy_on_cadence = 0;      dp_busy_off_cadence = 0;    }  if (flag_1)    {      START_TIMER (dp_busy_tone_timer);	  // problem may be in here?      if ((country_code != COUNTRY_NORTH_AMERICA		   && country_code != COUNTRY_CANADA)		  ? ((H_max_busy_cadence_on_time != 0			  /* Parameterised busy tone detection. */			  ? (dp_busy_on_cadence >= 10 * H_min_busy_cadence_on_time				 && dp_busy_on_cadence <= 10 * H_max_busy_cadence_on_time				 && dp_busy_off_cadence >= 10 * H_min_busy_cadence_off_time				 && dp_busy_off_cadence <= 10 * H_max_busy_cadence_off_time)			  /* Default algorithm. */			  : (dp_busy_on_cadence >= 100				 && dp_busy_on_cadence <= 850				 && ((dp_busy_on_cadence <= 150					  && (dp_busy_on_cadence + dp_busy_off_cadence > 250))					 || (dp_busy_on_cadence >= 150						 && (dp_busy_on_cadence							 <= (75 + dp_busy_off_cadence								 + (dp_busy_off_cadence / 2))))))))		  /* American/Canadian busy tone detection. */		  : ((dp_busy_on_cadence >= 195			  && dp_busy_on_cadence <= 305			  && dp_busy_off_cadence >= 195			  && dp_busy_off_cadence <= 305)			 || (dp_busy_on_cadence >= 420				 && dp_busy_on_cadence <= 580				 && dp_busy_off_cadence >= 420				 && dp_busy_off_cadence <= 580)))		{		  dp_busy_cycles++;		  dp_busy_on_cadence = 0;		  dp_busy_off_cadence = 0;		}    }  if (dp_busy_cycles >= H_busy_cycles_threshold)    {      dp_busy_cycles = 0;      return true;    }  if (energy > peak_busy_energy)    peak_busy_energy = energy;  return false;}// Detect incoming ring.bool dp_ring_detected(void){  if (dp_read_dsp_ram (0x3a) & 0x20)	return true;  else	return false; }// Ringback initialisation.void dp_ringback_init(void){   dp_no_ringback_timer = x_current_time();   dp_ringback_on_timer = x_current_time();   dp_ringback_off_timer = x_current_time();   dp_ringback_state = 2;   dp_ringback_on_cadence = 0;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
奇米影视一区二区三区小说| 国产精品久久久久久久第一福利| 国产精品美女久久福利网站| 亚洲成av人片观看| 国产91丝袜在线播放0| 欧美久久久久中文字幕| 国产精品成人在线观看| 久久精品国产99久久6| 欧美午夜一区二区三区免费大片| 国产精品毛片a∨一区二区三区| 日韩av一二三| 欧美亚洲综合久久| 国产精品成人免费在线| 国产精一区二区三区| 日韩色在线观看| 亚洲图片欧美色图| 91香蕉视频黄| 国产精品乱码人人做人人爱| 久久99精品国产91久久来源| 欧美日韩国产一级| 伊人一区二区三区| 91在线免费视频观看| 欧美国产一区在线| 精品一区二区三区视频在线观看| 欧美蜜桃一区二区三区| 一区二区三区免费网站| 91美女福利视频| 中文字幕中文字幕中文字幕亚洲无线| 国产最新精品免费| 精品福利av导航| 蜜桃视频在线一区| 日韩一二三区视频| 日韩1区2区日韩1区2区| 欧美区视频在线观看| 午夜激情综合网| 欧美日韩成人在线| 偷窥国产亚洲免费视频| 欧美日韩国产乱码电影| 亚洲一区二区精品视频| 在线区一区二视频| 一区二区三区成人| 欧洲在线/亚洲| 亚洲国产一区视频| 欧美日韩国产色站一区二区三区| 亚洲高清在线视频| 欧美日韩高清一区二区三区| 亚州成人在线电影| 欧美一区二区三区视频免费播放 | 色综合久久中文综合久久牛| 香蕉影视欧美成人| 91麻豆精品国产91久久久资源速度 | 欧美日本精品一区二区三区| 亚洲成a人片在线不卡一二三区| 欧美亚洲综合久久| 手机精品视频在线观看| 欧美一区二区三区精品| 久久99精品国产麻豆不卡| 2021国产精品久久精品| 成人午夜短视频| 最新国产精品久久精品| 91久久精品一区二区二区| 亚洲一级二级三级| 91精品国产品国语在线不卡 | 最新高清无码专区| 91麻豆蜜桃一区二区三区| 一区二区视频在线| 欧美精品丝袜久久久中文字幕| 日韩激情一区二区| 久久久久亚洲综合| 99精品国产视频| 午夜久久久久久久久| 日韩一区二区免费在线观看| 国内精品久久久久影院薰衣草 | 在线综合视频播放| 狠狠色丁香久久婷婷综合丁香| 亚洲国产精品ⅴa在线观看| 91网站黄www| 日本欧美大码aⅴ在线播放| 久久综合一区二区| 91首页免费视频| 视频一区二区国产| 国产午夜精品一区二区三区四区| 成人不卡免费av| 午夜精品久久久久久| 国产亚洲欧洲997久久综合| 91论坛在线播放| 日本麻豆一区二区三区视频| 国产午夜精品久久| 欧美日韩中文字幕一区| 国产一区二区主播在线| 亚洲乱码国产乱码精品精可以看 | 欧美自拍偷拍午夜视频| 日本一区中文字幕| 国产精品素人视频| 欧美日韩高清不卡| 不卡一二三区首页| 青娱乐精品视频在线| 日韩一区日韩二区| 日韩一区二区免费在线电影| 99久久久精品| 狠狠色综合日日| 亚洲午夜免费福利视频| 亚洲国产精品v| 欧美一区二区黄色| 99国产精品久久久久| 久久精品国产色蜜蜜麻豆| 亚洲精品乱码久久久久久| 久久免费午夜影院| 欧美人xxxx| 99国产欧美另类久久久精品| 精品一区二区三区蜜桃| 亚洲国产精品久久久久婷婷884| 久久久国际精品| 欧美精品1区2区3区| 99热这里都是精品| 韩国三级在线一区| 视频在线观看国产精品| 亚洲三级免费观看| 久久精品欧美日韩精品| 日韩视频免费观看高清完整版| 色婷婷亚洲婷婷| 国产成人亚洲综合a∨猫咪| 免费日本视频一区| 亚洲一区精品在线| 综合欧美亚洲日本| 国产亚洲精品资源在线26u| 欧美一级片在线| 精品视频在线视频| 91久久精品国产91性色tv| 成人午夜大片免费观看| 国产一区二区三区电影在线观看| 五月天网站亚洲| 亚洲综合视频在线| 亚洲色欲色欲www| 国产欧美一区视频| 久久久久久一级片| 精品免费日韩av| 欧美一级久久久久久久大片| 欧美性欧美巨大黑白大战| 色综合天天综合网天天看片| 成人看片黄a免费看在线| 国产精品99久久久久久似苏梦涵| 久久精品理论片| 日本少妇一区二区| 婷婷综合五月天| 天天综合天天综合色| 亚洲成人av资源| 午夜精品在线看| 午夜婷婷国产麻豆精品| 亚洲电影欧美电影有声小说| 亚洲午夜影视影院在线观看| 亚洲一区在线电影| 亚洲一区二区综合| 亚洲gay无套男同| 亚洲成人激情自拍| 日韩电影在线看| 日韩av一区二区三区| 免费成人美女在线观看| 免费av成人在线| 韩国欧美一区二区| 国产福利视频一区二区三区| 国产乱码字幕精品高清av| 国产精品99久| 国产91在线观看| 99久久综合国产精品| av高清久久久| 欧美专区日韩专区| 91精品国产综合久久国产大片| 欧美一区二区三区男人的天堂| 日韩精品一区国产麻豆| 26uuu国产在线精品一区二区| 久久综合网色—综合色88| 国产欧美日韩亚州综合| 国产精品久久久久7777按摩| 最新国产成人在线观看| 亚洲综合丁香婷婷六月香| 性久久久久久久久| 久国产精品韩国三级视频| 国产精品自拍av| 成人精品视频一区| 一本久久精品一区二区| 欧美另类z0zxhd电影| 精品区一区二区| 欧美高清在线一区二区| 一区二区三区欧美激情| 天天影视涩香欲综合网| 寂寞少妇一区二区三区| 大白屁股一区二区视频| 在线视频你懂得一区| 制服丝袜在线91| 久久精品人人爽人人爽| 亚洲激情图片qvod| 亚洲v日本v欧美v久久精品| 麻豆91在线播放免费| 成人高清免费观看| 欧美日韩在线亚洲一区蜜芽| 欧美电影精品一区二区| 中文字幕的久久| 亚洲.国产.中文慕字在线| 国模娜娜一区二区三区|