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

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

?? macboing.c

?? 這個linux源代碼是很全面的~基本完整了~使用c編譯的~由于時間問題我沒有親自測試~但就算用來做參考資料也是非常好的
?? 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 ){} 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品无人区卡一卡二卡三乱码免费卡 | 九九在线精品视频| 青青草国产精品亚洲专区无| 久久不见久久见免费视频7| 国产剧情av麻豆香蕉精品| 99精品视频一区二区| 欧美三级日本三级少妇99| 欧美一级高清片| 日本一区二区免费在线| 一区二区三区在线免费观看| 久久国产尿小便嘘嘘尿| 成人精品一区二区三区中文字幕| 欧美在线观看视频一区二区三区| 欧美一区二区三区人| 国产午夜精品福利| 亚洲国产日韩精品| 国产一区二区0| 色老汉一区二区三区| 精品美女一区二区| 亚洲精品高清在线| 青青草国产精品亚洲专区无| 99re6这里只有精品视频在线观看| 日本不卡一区二区| 国产成人av电影免费在线观看| 欧美亚洲免费在线一区| 91精品麻豆日日躁夜夜躁| 国产日韩精品一区二区浪潮av| 综合电影一区二区三区| 五月激情六月综合| 波多野结衣亚洲一区| 欧美日韩一级二级| 国产精品天美传媒| 精品欧美乱码久久久久久 | 国产精品色哟哟| 视频在线观看国产精品| 风间由美一区二区av101| 欧美调教femdomvk| 国产精品天美传媒| 日韩1区2区日韩1区2区| 99久久久免费精品国产一区二区| 欧美一级午夜免费电影| 自拍偷拍亚洲综合| 狠狠色丁香久久婷婷综合丁香| 欧美系列亚洲系列| 中文字幕一区二区三区四区不卡| 久久99精品久久久久久动态图| 色婷婷av一区二区三区软件| 国产视频一区二区在线观看| 美女视频网站久久| 欧美日韩一区二区三区四区| 亚洲视频免费在线观看| 国产成人精品综合在线观看| 精品国产一区久久| 视频在线观看国产精品| 欧美影视一区二区三区| 亚洲欧美日韩中文播放| 丁香激情综合国产| 2023国产精华国产精品| 日韩成人免费电影| 欧美午夜一区二区三区 | 91视频在线看| 欧美国产精品一区二区| 黄页视频在线91| 日韩欧美你懂的| 天堂一区二区在线| 色婷婷综合五月| 亚洲男人天堂av| 成人av资源在线观看| 色哟哟一区二区在线观看| 91精品国产手机| 亚洲成人免费影院| 91成人在线免费观看| 亚洲精品高清在线| 一本一本久久a久久精品综合麻豆| 欧美经典三级视频一区二区三区| 国产精品资源在线观看| 精品日韩欧美在线| 麻豆国产欧美日韩综合精品二区| 欧美一区二视频| 强制捆绑调教一区二区| 欧美高清精品3d| 美女在线一区二区| 欧美不卡一区二区三区四区| 激情综合亚洲精品| 久久理论电影网| 国产成人精品亚洲午夜麻豆| 中文子幕无线码一区tr| av一区二区三区黑人| 亚洲欧美国产77777| 在线观看日韩电影| 性做久久久久久| 欧美大片在线观看| 国模无码大尺度一区二区三区| 国产亚洲欧美一级| 成人免费看黄yyy456| 亚洲欧美日韩小说| 欧美体内she精高潮| 男人的j进女人的j一区| 精品久久久久久久人人人人传媒| 美女网站色91| 欧美激情一区二区三区| 91首页免费视频| 日韩av一区二区在线影视| 精品少妇一区二区| 成人在线一区二区三区| 亚洲欧美在线视频观看| 欧美三级中文字| 久草精品在线观看| 国产精品毛片无遮挡高清| 一本一道久久a久久精品| 日韩精品一二区| 久久久久久久久久电影| 99久久伊人精品| 舔着乳尖日韩一区| 久久免费的精品国产v∧| 色综合久久中文字幕| 日本vs亚洲vs韩国一区三区二区 | 蜜桃免费网站一区二区三区| 国产欧美日韩亚州综合 | 国产精品成人免费| 欧美性视频一区二区三区| 久久er99热精品一区二区| 欧美国产一区视频在线观看| 在线观看成人免费视频| 久久精品国产免费| 中文字幕一区二区不卡| 91精品综合久久久久久| 处破女av一区二区| 午夜欧美视频在线观看| 久久精品无码一区二区三区| 欧美在线制服丝袜| 国产在线精品不卡| 亚洲一区视频在线观看视频| 久久嫩草精品久久久久| 欧美日韩中文精品| 丁香婷婷深情五月亚洲| 青草av.久久免费一区| 日韩理论电影院| 精品福利一区二区三区| 色噜噜狠狠成人网p站| 国产一区二区三区四区五区美女| 亚洲六月丁香色婷婷综合久久 | 国产一本一道久久香蕉| 亚洲一二三四久久| 久久久99久久| 欧美一区二区视频在线观看2022| 99精品国产99久久久久久白柏| 精品在线你懂的| 亚洲成人久久影院| 亚洲欧洲色图综合| 久久综合久色欧美综合狠狠| 在线91免费看| 一本一道综合狠狠老| 国产成人在线色| 久久99久久99| 日本欧美大码aⅴ在线播放| 成人免费在线播放视频| 久久综合色婷婷| 欧美一区二区三区白人| 日本韩国一区二区三区| 国产福利一区在线观看| 免费成人av资源网| 亚洲一区二区三区四区在线免费观看| 日本一区二区综合亚洲| 精品福利在线导航| 日韩一区二区三区视频| 欧美日韩精品电影| 日本韩国精品在线| 成人免费视频一区二区| 国产在线精品一区二区不卡了| 日本三级韩国三级欧美三级| 天天色图综合网| 亚洲国产va精品久久久不卡综合| 亚洲色图第一区| 国产精品国模大尺度视频| 久久久综合九色合综国产精品| 日韩欧美久久一区| 91精品国产综合久久精品图片| 欧美电影一区二区| 欧美酷刑日本凌虐凌虐| 欧美日韩精品高清| 欧美日本在线播放| 欧美日韩色一区| 欧美性色黄大片| 欧美日韩一区二区三区在线| 欧美日韩一区三区| 在线观看国产精品网站| 欧美怡红院视频| 欧美三级电影精品| 欧美日韩精品一区二区天天拍小说| 欧美日韩在线观看一区二区 | 日本亚洲免费观看| 日韩电影一区二区三区四区| 三级在线观看一区二区| 免费观看在线色综合| 国产一区在线观看麻豆| 国产一区二三区好的| 春色校园综合激情亚洲| 99re免费视频精品全部| 色老汉一区二区三区|