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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? macboing.c

?? microwindows移植到S3C44B0的源碼
?? C
字號:
/* *	Mac bong noise generator. Note - we ought to put a boingy noise *	here 8) *	  *	---------------------------------------------------------------------- *	16.11.98: *	rewrote some functions, added support for Enhanced ASC (Quadras) *	after the NetBSD asc.c console bell patch by Colin Wood/Frederick Bruck *	Juergen Mellinger (juergen.mellinger@t-online.de) */#include <linux/sched.h>#include <linux/timer.h>#include <asm/macintosh.h>#include <asm/mac_asc.h>static int mac_asc_inited = 0;/* * dumb triangular wave table */static __u8 mac_asc_wave_tab[ 0x800 ];/* * Alan's original sine table; needs interpolating to 0x800  * (hint: interpolate or hardwire [0 -> Pi/2[, it's symmetric)  */static const signed char sine_data[] = {	0,  39,  75,  103,  121,  127,  121,  103,  75,  39,	0, -39, -75, -103, -121, -127, -121, -103, -75, -39};/* * where the ASC hides ... */static volatile __u8* mac_asc_regs = ( void* )0x50F14000;/*  * sample rate; is this a good default value?  */static unsigned long mac_asc_samplespersec = 11050;  static int mac_bell_duration = 0;static unsigned long mac_bell_phase; /* 0..2*Pi -> 0..0x800 (wavetable size) */static unsigned long mac_bell_phasepersample;/* * some function protos  */static void mac_init_asc( void );static void mac_nosound( unsigned long );static void mac_quadra_start_bell( unsigned int, unsigned int, unsigned int );static void mac_quadra_ring_bell( unsigned long );static void mac_av_start_bell( unsigned int, unsigned int, unsigned int );static void ( *mac_special_bell )( unsigned int, unsigned int, unsigned int ) = NULL;/* * our timer to start/continue/stop the bell */static struct timer_list mac_sound_timer = { function: mac_nosound };/* * Sort of initialize the sound chip (called from mac_mksound on the first * beep). */static void mac_init_asc( void ){	int i;	/* 	 * do some machine specific initialization 	 * BTW:	 * the NetBSD Quadra patch identifies the Enhanced Apple Sound Chip via	 * 	mac_asc_regs[ 0x800 ] & 0xF0 != 0	 * this makes no sense here, because we have to set the default sample	 * rate anyway if we want correct frequencies	 */	switch ( macintosh_config->ident )	{		case MAC_MODEL_IIFX:			/*			 * The IIfx is always special ...			 */			mac_asc_regs = ( void* )0x50010000;			break;			/* 			 * not sure about how correct this list is 			 * machines with the EASC enhanced apple sound chip 			 */		case MAC_MODEL_Q630:		case MAC_MODEL_P475:			mac_special_bell = mac_quadra_start_bell;			mac_asc_samplespersec = 22150;			break;			case MAC_MODEL_C660:		case MAC_MODEL_Q840:			/*			 * The Quadra 660AV and 840AV use the "Singer" custom ASIC for sound I/O.			 * It appears to be similar to the "AWACS" custom ASIC in the Power Mac 			 * [678]100.  Because Singer and AWACS may have a similar hardware 			 * interface, this would imply that the code in drivers/sound/dmasound.c 			 * for AWACS could be used as a basis for Singer support.  All we have to			 * do is figure out how to do DMA on the 660AV/840AV through the PSC and 			 * figure out where the Singer hardware sits in memory. (I'd look in the			 * vicinity of the AWACS location in a Power Mac [678]100 first, or the 			 * current location of the Apple Sound Chip--ASC--in other Macs.)  The 			 * Power Mac [678]100 info can be found in MkLinux Mach kernel sources.			 *			 * Quoted from Apple's Tech Info Library, article number 16405:			 *   "Among desktop Macintosh computers, only the 660AV, 840AV, and Power			 *   Macintosh models have 16-bit audio input and output capability			 *   because of the AT&T DSP3210 hardware circuitry and the 16-bit Singer			 *   codec circuitry in the AVs.  The Audio Waveform Amplifier and			 *   Converter (AWAC) chip in the Power Macintosh performs the same 			 *   16-bit I/O functionality.  The PowerBook 500 series computers			 *   support 16-bit stereo output, but only mono input."			 *			 *   http://til.info.apple.com/techinfo.nsf/artnum/n16405			 *			 * --David Kilzer			 */			mac_special_bell = mac_av_start_bell;			break;		case MAC_MODEL_Q650:		case MAC_MODEL_Q700:		case MAC_MODEL_Q800:		case MAC_MODEL_Q900:		case MAC_MODEL_Q950:			/*			 * Currently not implemented!			 */			mac_special_bell = NULL;			break;		default:			/*			 * Every switch needs a default			 */			mac_special_bell = NULL;			break;	}	/* 	 * init the wave table with a simple triangular wave 	 * A sine wave would sure be nicer here ...	 */	for ( i = 0; i < 0x400; i++ )	{		mac_asc_wave_tab[ i ] = i / 4;		mac_asc_wave_tab[ i + 0x400 ] = 0xFF - i / 4;	}	mac_asc_inited = 1;}	/* * Called to make noise; current single entry to the boing driver.  * Does the job for simple ASC, calls other routines else. * XXX Fixme: * Should be split into asc_mksound, easc_mksound, av_mksound and  * function pointer set in mac_init_asc which would be called at  * init time.  * _This_ is rather ugly ... */void mac_mksound( unsigned int freq, unsigned int length ){	__u32 cfreq = ( freq << 5 ) / 468;	__u32 flags;	int i;	if ( mac_special_bell == NULL )	{		/* Do nothing */		return;	}	if ( !mac_asc_inited )		mac_init_asc();	if ( mac_special_bell )	{		mac_special_bell( freq, length, 128 );		return;	}	if ( freq < 20 || freq > 20000 || length == 0 )	{		mac_nosound( 0 );		return;	}	save_flags( flags );	cli();	del_timer( &mac_sound_timer );	for ( i = 0; i < 0x800; i++ )		mac_asc_regs[ i ] = 0;		for ( i = 0; i < 0x800; i++ )		mac_asc_regs[ i ] = mac_asc_wave_tab[ i ];	for ( i = 0; i < 8; i++ )		*( __u32* )( ( __u32 )mac_asc_regs + ASC_CONTROL + 0x814 + 8 * i ) = cfreq;	mac_asc_regs[ 0x807 ] = 0;	mac_asc_regs[ ASC_VOLUME ] = 128;	mac_asc_regs[ 0x805 ] = 0;	mac_asc_regs[ 0x80F ] = 0;	mac_asc_regs[ ASC_MODE ] = ASC_MODE_SAMPLE;	mac_asc_regs[ ASC_ENABLE ] = ASC_ENABLE_SAMPLE;	mac_sound_timer.expires = jiffies + length;	add_timer( &mac_sound_timer );	restore_flags( flags );	}/* * regular ASC: stop whining .. */static void mac_nosound( unsigned long ignored ){	mac_asc_regs[ ASC_ENABLE ] = 0;}	/* * EASC entry; init EASC, don't load wavetable, schedule 'start whining'. */static void mac_quadra_start_bell( unsigned int freq, unsigned int length, unsigned int volume ){	__u32 flags;	/* if the bell is already ringing, ring longer */	if ( mac_bell_duration > 0 )	{		mac_bell_duration += length;		return;	}	mac_bell_duration = length;	mac_bell_phase = 0;	mac_bell_phasepersample = ( freq * sizeof( mac_asc_wave_tab ) ) / mac_asc_samplespersec;	/* this is reasonably big for small frequencies */ 	save_flags( flags );	cli();	/* set the volume */	mac_asc_regs[ 0x806 ] = volume;	/* set up the ASC registers */	if ( mac_asc_regs[ 0x801 ] != 1 )	{		/* select mono mode */			mac_asc_regs[ 0x807 ] = 0;		/* select sampled sound mode */		mac_asc_regs[ 0x802 ] = 0;	 	/* ??? */			mac_asc_regs[ 0x801 ] = 1;		mac_asc_regs[ 0x803 ] |= 0x80;		mac_asc_regs[ 0x803 ] &= 0x7F;	}	mac_sound_timer.function = mac_quadra_ring_bell;	mac_sound_timer.expires = jiffies + 1;	add_timer( &mac_sound_timer );	restore_flags( flags );}/* * EASC 'start/continue whining'; I'm not sure why the above function didn't * already load the wave table, or at least call this one...  * This piece keeps reloading the wave table until done. */static void mac_quadra_ring_bell( unsigned long ignored ){	int 	i, count = mac_asc_samplespersec / HZ;	__u32 flags;	/*	 * we neither want a sound buffer overflow nor underflow, so we need to match	 * the number of samples per timer interrupt as exactly as possible.	 * using the asc interrupt will give better results in the future	 * ...and the possibility to use a real sample (a boingy noise, maybe...)	 */	save_flags( flags );	cli();		del_timer( &mac_sound_timer );	if ( mac_bell_duration-- > 0 )	{		for ( i = 0; i < count; i++ )		{			mac_bell_phase += mac_bell_phasepersample;			mac_asc_regs[ 0 ] = mac_asc_wave_tab[ mac_bell_phase & ( sizeof( mac_asc_wave_tab ) - 1 ) ];		}		mac_sound_timer.expires = jiffies + 1;		add_timer( &mac_sound_timer );	}	else		mac_asc_regs[ 0x801 ] = 0;		restore_flags( flags );}/* * AV code - please fill in. */static void mac_av_start_bell( unsigned int freq, unsigned int length, unsigned int volume ){} 

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美精品丝袜中出| 国产日产欧美一区二区三区| 欧美成人伊人久久综合网| 久久九九全国免费| 免费av网站大全久久| 91女人视频在线观看| 久久色成人在线| 日韩中文字幕一区二区三区| 91亚洲精品久久久蜜桃网站| 精品国产露脸精彩对白| 免费久久精品视频| 欧美日韩国产不卡| 亚洲精品久久久久久国产精华液| 国产激情91久久精品导航| 7777精品久久久大香线蕉| 一区二区三区中文字幕| 成人黄色a**站在线观看| 久久久精品免费免费| 精品亚洲国产成人av制服丝袜 | 成人99免费视频| 精品久久一区二区三区| 美脚の诱脚舐め脚责91| 欧美高清精品3d| 午夜影院久久久| 欧美视频一区二区三区在线观看| 亚洲欧美日韩一区| 97aⅴ精品视频一二三区| 国产精品伦理在线| 国产成人精品网址| 国产精品素人一区二区| 国产成人丝袜美腿| 欧美国产日韩精品免费观看| 国产成a人亚洲精品| 国产精品久线在线观看| 91视频在线看| 中文字幕亚洲一区二区va在线| 国产成a人亚洲| 国产精品电影一区二区| 91麻豆swag| 亚洲第一福利一区| 日韩一本二本av| 精品一区二区综合| 国产视频一区不卡| 92精品国产成人观看免费| 中文字幕在线观看不卡| 色婷婷综合激情| 午夜影视日本亚洲欧洲精品| 日韩欧美一区电影| 国产成人精品影院| 亚洲靠逼com| 欧美日本一区二区在线观看| 老司机一区二区| 国产精品国产三级国产普通话三级| www.欧美色图| 午夜在线电影亚洲一区| 久久久久99精品一区| 91色porny| 久久狠狠亚洲综合| 亚洲欧洲精品成人久久奇米网| 欧美在线观看禁18| 精品一区二区精品| 亚洲精品国产一区二区精华液| 56国语精品自产拍在线观看| 国产精品99久久久久| 夜夜嗨av一区二区三区中文字幕| 日韩欧美在线综合网| 99久久伊人精品| 美女视频黄久久| 国产精品不卡一区二区三区| 91麻豆精品国产91久久久更新时间 | 国产不卡视频在线观看| 亚洲韩国一区二区三区| 国产日韩欧美亚洲| 欧美精品久久一区| 国产91富婆露脸刺激对白| 午夜精品久久久久久久久久久| 久久久精品黄色| 91麻豆精品国产91久久久久| 色综合视频一区二区三区高清| 久久疯狂做爰流白浆xx| 综合色天天鬼久久鬼色| 久久色在线视频| 91精品国产色综合久久不卡蜜臀| 99久久99久久精品免费看蜜桃 | 伊人婷婷欧美激情| 久久综合99re88久久爱| 欧美日本乱大交xxxxx| 成人高清在线视频| 国产麻豆91精品| 美女尤物国产一区| 香蕉av福利精品导航 | 中日韩av电影| 日韩久久久久久| 欧美军同video69gay| 色婷婷综合视频在线观看| 成人精品在线视频观看| 国内一区二区在线| 久久精品国产77777蜜臀| 性感美女极品91精品| 亚洲综合一区在线| 亚洲免费观看高清完整版在线观看熊| 久久久国产一区二区三区四区小说| 日韩一区二区免费在线观看| 欧美日韩国产精品成人| 欧美日韩国产乱码电影| 欧美日韩激情一区二区| 欧美日本国产一区| 欧美高清你懂得| 欧美一区二区三区四区在线观看 | 日韩不卡一区二区三区| 亚洲自拍偷拍网站| 亚洲线精品一区二区三区 | 国产精品一色哟哟哟| 韩国在线一区二区| 国产激情精品久久久第一区二区| 国产精品自拍一区| 国产成人免费视频精品含羞草妖精| 国产精品一区二区果冻传媒| 国产麻豆精品在线| 成人免费视频一区| 成人国产视频在线观看| 色悠悠久久综合| 欧美性生交片4| 欧美一区二区三区视频| www亚洲一区| 中文字幕精品一区二区精品绿巨人| 国产精品免费视频一区| 亚洲卡通动漫在线| 视频一区二区中文字幕| 精彩视频一区二区三区| 国产成人精品三级麻豆| 91在线码无精品| 欧美日韩精品高清| 久久男人中文字幕资源站| 中文字幕一区二区不卡| 午夜精品免费在线| 国产精品主播直播| 一本大道久久a久久精二百| 欧美日本一区二区在线观看| 久久综合久色欧美综合狠狠| 国产精品美女一区二区在线观看| 日韩美女视频19| 日本vs亚洲vs韩国一区三区二区| 国产一区激情在线| 色香蕉久久蜜桃| 欧美大片日本大片免费观看| 国产精品久久久久久久蜜臀| 亚洲成人免费视| 国产福利精品导航| 欧美亚洲一区二区三区四区| 精品国产1区二区| 亚洲女厕所小便bbb| 精品一区二区三区视频| 色综合天天综合网天天看片| 日韩精品一区二区三区在线观看| 国产精品的网站| 日韩国产欧美在线视频| 99久久婷婷国产综合精品| 日韩亚洲欧美一区二区三区| 国产精品美女一区二区三区 | xnxx国产精品| 亚洲成人综合在线| 成人性视频网站| 日韩免费电影网站| 亚洲国产精品久久久久婷婷884 | 91精品国产品国语在线不卡| 国产精品久久久久四虎| 久久成人18免费观看| 欧美三级韩国三级日本三斤 | 91女厕偷拍女厕偷拍高清| 久久综合99re88久久爱| 丝袜亚洲另类欧美| 91麻豆蜜桃一区二区三区| 国产精品亲子乱子伦xxxx裸| 国内精品视频666| 日韩欧美国产三级| 午夜精品一区在线观看| 91麻豆福利精品推荐| 国产精品第一页第二页第三页| 国产乱码精品一品二品| 91精品国产91综合久久蜜臀| 亚洲福利国产精品| 欧美在线观看18| 亚洲午夜久久久久中文字幕久| 99在线视频精品| 国产精品黄色在线观看| 成人国产免费视频| 国产精品高潮久久久久无| 国产成人精品综合在线观看| 久久九九久久九九| 国产99一区视频免费| 久久久久国产免费免费| 国产成a人亚洲| 中文字幕成人网| 风间由美性色一区二区三区| 欧美激情综合网| 不卡影院免费观看| 最新日韩av在线| 欧美视频第二页| 日韩福利电影在线|