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

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

?? id_sd.c

?? wolf3d游戲源代碼!非常不錯! 與大家共享! 如果大家又相關資料還請多多上傳!
?? C
?? 第 1 頁 / 共 4 頁
字號:

			// Turn SB Pro stereo DAC off
			sbOut(sbpMixerAddr,sbpmControl);
			sbOut(sbpMixerData,0);				// 0=off,2=on
		}
	}
}

///////////////////////////////////////////////////////////////////////////
//
//	SDL_ShutSB() - Turns off the SoundBlaster
//
///////////////////////////////////////////////////////////////////////////
static void
SDL_ShutSB(void)
{
	SDL_SBStopSample();

	if (SBProPresent)
	{
		// Restore FM output levels (SB Pro)
		sbOut(sbpMixerAddr,sbpmFMVol);
		sbOut(sbpMixerData,sbpOldFMMix);

		// Restore Voice output levels (SB Pro)
		sbOut(sbpMixerAddr,sbpmVoiceVol);
		sbOut(sbpMixerData,sbpOldVOCMix);
	}

	setvect(sbIntVec,sbOldIntHand);		// Set vector back
}

//	Sound Source Code

///////////////////////////////////////////////////////////////////////////
//
//	SDL_SSStopSample() - Stops a sample playing on the Sound Source
//
///////////////////////////////////////////////////////////////////////////
#ifdef	_MUSE_
void
#else
static void
#endif
SDL_SSStopSample(void)
{
asm	pushf
asm	cli

	(long)ssSample = 0;

asm	popf
}

///////////////////////////////////////////////////////////////////////////
//
//	SDL_SSService() - Handles playing the next sample on the Sound Source
//
///////////////////////////////////////////////////////////////////////////
static void
SDL_SSService(void)
{
	boolean	gotit;
	byte	v;

	while (ssSample)
	{
	asm	mov		dx,[ssStatus]	// Check to see if FIFO is currently empty
	asm	in		al,dx
	asm	test	al,0x40
	asm	jnz		done			// Nope - don't push any more data out

		v = *ssSample++;
		if (!(--ssLengthLeft))
		{
			(long)ssSample = 0;
			SDL_DigitizedDone();
		}

	asm	mov		dx,[ssData]		// Pump the value out
	asm	mov		al,[v]
	asm	out		dx,al

	asm	mov		dx,[ssControl]	// Pulse printer select
	asm	mov		al,[ssOff]
	asm	out		dx,al
	asm	push	ax
	asm	pop		ax
	asm	mov		al,[ssOn]
	asm	out		dx,al

	asm	push	ax				// Delay a short while
	asm	pop		ax
	asm	push	ax
	asm	pop		ax
	}
done:;
}

///////////////////////////////////////////////////////////////////////////
//
//	SDL_SSPlaySample() - Plays the specified sample on the Sound Source
//
///////////////////////////////////////////////////////////////////////////
#ifdef	_MUSE_
void
#else
static void
#endif
SDL_SSPlaySample(byte huge *data,longword len)
{
asm	pushf
asm	cli

	ssLengthLeft = len;
	ssSample = (volatile byte far *)data;

asm	popf
}

///////////////////////////////////////////////////////////////////////////
//
//	SDL_StartSS() - Sets up for and turns on the Sound Source
//
///////////////////////////////////////////////////////////////////////////
static void
SDL_StartSS(void)
{
	if (ssPort == 3)
		ssControl = 0x27a;	// If using LPT3
	else if (ssPort == 2)
		ssControl = 0x37a;	// If using LPT2
	else
		ssControl = 0x3be;	// If using LPT1
	ssStatus = ssControl - 1;
	ssData = ssStatus - 1;

	ssOn = 0x04;
	if (ssIsTandy)
		ssOff = 0x0e;				// Tandy wierdness
	else
		ssOff = 0x0c;				// For normal machines

	outportb(ssControl,ssOn);		// Enable SS
}

///////////////////////////////////////////////////////////////////////////
//
//	SDL_ShutSS() - Turns off the Sound Source
//
///////////////////////////////////////////////////////////////////////////
static void
SDL_ShutSS(void)
{
	outportb(ssControl,ssOff);
}

///////////////////////////////////////////////////////////////////////////
//
//	SDL_CheckSS() - Checks to see if a Sound Source is present at the
//		location specified by the sound source variables
//
///////////////////////////////////////////////////////////////////////////
static boolean
SDL_CheckSS(void)
{
	boolean		present = false;
	longword	lasttime;

	// Turn the Sound Source on and wait awhile (4 ticks)
	SDL_StartSS();

	lasttime = TimeCount;
	while (TimeCount < lasttime + 4)
		;

asm	mov		dx,[ssStatus]	// Check to see if FIFO is currently empty
asm	in		al,dx
asm	test	al,0x40
asm	jnz		checkdone		// Nope - Sound Source not here

asm	mov		cx,32			// Force FIFO overflow (FIFO is 16 bytes)
outloop:
asm	mov		dx,[ssData]		// Pump a neutral value out
asm	mov		al,0x80
asm	out		dx,al

asm	mov		dx,[ssControl]	// Pulse printer select
asm	mov		al,[ssOff]
asm	out		dx,al
asm	push	ax
asm	pop		ax
asm	mov		al,[ssOn]
asm	out		dx,al

asm	push	ax				// Delay a short while before we do this again
asm	pop		ax
asm	push	ax
asm	pop		ax

asm	loop	outloop

asm	mov		dx,[ssStatus]	// Is FIFO overflowed now?
asm	in		al,dx
asm	test	al,0x40
asm	jz		checkdone		// Nope, still not - Sound Source not here

	present = true;			// Yes - it's here!

checkdone:
	SDL_ShutSS();
	return(present);
}

static boolean
SDL_DetectSoundSource(void)
{
	for (ssPort = 1;ssPort <= 3;ssPort++)
		if (SDL_CheckSS())
			return(true);
	return(false);
}

//
//	PC Sound code
//

///////////////////////////////////////////////////////////////////////////
//
//	SDL_PCPlaySample() - Plays the specified sample on the PC speaker
//
///////////////////////////////////////////////////////////////////////////
#ifdef	_MUSE_
void
#else
static void
#endif
SDL_PCPlaySample(byte huge *data,longword len)
{
asm	pushf
asm	cli

	SDL_IndicatePC(true);

	pcLengthLeft = len;
	pcSound = (volatile byte far *)data;

asm	popf
}

///////////////////////////////////////////////////////////////////////////
//
//	SDL_PCStopSample() - Stops a sample playing on the PC speaker
//
///////////////////////////////////////////////////////////////////////////
#ifdef	_MUSE_
void
#else
static void
#endif
SDL_PCStopSample(void)
{
asm	pushf
asm	cli

	(long)pcSound = 0;

	SDL_IndicatePC(false);

asm	in	al,0x61		  	// Turn the speaker off
asm	and	al,0xfd			// ~2
asm	out	0x61,al

asm	popf
}

///////////////////////////////////////////////////////////////////////////
//
//	SDL_PCPlaySound() - Plays the specified sound on the PC speaker
//
///////////////////////////////////////////////////////////////////////////
#ifdef	_MUSE_
void
#else
static void
#endif
SDL_PCPlaySound(PCSound far *sound)
{
asm	pushf
asm	cli

	pcLastSample = -1;
	pcLengthLeft = sound->common.length;
	pcSound = sound->data;

asm	popf
}

///////////////////////////////////////////////////////////////////////////
//
//	SDL_PCStopSound() - Stops the current sound playing on the PC Speaker
//
///////////////////////////////////////////////////////////////////////////
#ifdef	_MUSE_
void
#else
static void
#endif
SDL_PCStopSound(void)
{
asm	pushf
asm	cli

	(long)pcSound = 0;

asm	in	al,0x61		  	// Turn the speaker off
asm	and	al,0xfd			// ~2
asm	out	0x61,al

asm	popf
}

#if 0
///////////////////////////////////////////////////////////////////////////
//
//	SDL_PCService() - Handles playing the next sample in a PC sound
//
///////////////////////////////////////////////////////////////////////////
static void
SDL_PCService(void)
{
	byte	s;
	word	t;

	if (pcSound)
	{
		s = *pcSound++;
		if (s != pcLastSample)
		{
		asm	pushf
		asm	cli

			pcLastSample = s;
			if (s)					// We have a frequency!
			{
				t = pcSoundLookup[s];
			asm	mov	bx,[t]

			asm	mov	al,0xb6			// Write to channel 2 (speaker) timer
			asm	out	43h,al
			asm	mov	al,bl
			asm	out	42h,al			// Low byte
			asm	mov	al,bh
			asm	out	42h,al			// High byte

			asm	in	al,0x61			// Turn the speaker & gate on
			asm	or	al,3
			asm	out	0x61,al
			}
			else					// Time for some silence
			{
			asm	in	al,0x61		  	// Turn the speaker & gate off
			asm	and	al,0xfc			// ~3
			asm	out	0x61,al
			}

		asm	popf
		}

		if (!(--pcLengthLeft))
		{
			SDL_PCStopSound();
			SDL_SoundFinished();
		}
	}
}
#endif

///////////////////////////////////////////////////////////////////////////
//
//	SDL_ShutPC() - Turns off the pc speaker
//
///////////////////////////////////////////////////////////////////////////
static void
SDL_ShutPC(void)
{
asm	pushf
asm	cli

	pcSound = 0;

asm	in	al,0x61		  	// Turn the speaker & gate off
asm	and	al,0xfc			// ~3
asm	out	0x61,al

asm	popf
}

//
//	Stuff for digitized sounds
//
memptr
SDL_LoadDigiSegment(word page)
{
	memptr	addr;

#if 0	// for debugging
asm	mov	dx,STATUS_REGISTER_1
asm	in	al,dx
asm	mov	dx,ATR_INDEX
asm	mov	al,ATR_OVERSCAN
asm	out	dx,al
asm	mov	al,10	// bright green
asm	out	dx,al
#endif

	addr = PM_GetSoundPage(page);
	PM_SetPageLock(PMSoundStart + page,pml_Locked);

#if 0	// for debugging
asm	mov	dx,STATUS_REGISTER_1
asm	in	al,dx
asm	mov	dx,ATR_INDEX
asm	mov	al,ATR_OVERSCAN
asm	out	dx,al
asm	mov	al,3	// blue
asm	out	dx,al
asm	mov	al,0x20	// normal
asm	out	dx,al
#endif

	return(addr);
}

void
SDL_PlayDigiSegment(memptr addr,word len)
{
	switch (DigiMode)
	{
	case sds_PC:
    	SDL_PCPlaySample(addr,len);
		break;
	case sds_SoundSource:
		SDL_SSPlaySample(addr,len);
		break;
	case sds_SoundBlaster:
		SDL_SBPlaySample(addr,len);
		break;
	}
}

void
SD_StopDigitized(void)
{
	int	i;

asm	pushf
asm	cli

	DigiLeft = 0;
	DigiNextAddr = nil;
	DigiNextLen = 0;
	DigiMissed = false;
	DigiPlaying = false;
	DigiNumber = DigiPriority = 0;
	SoundPositioned = false;
	if ((DigiMode == sds_PC) && (SoundMode == sdm_PC))
		SDL_SoundFinished();

	switch (DigiMode)
	{
	case sds_PC:
		SDL_PCStopSample();
		break;
	case sds_SoundSource:
		SDL_SSStopSample();
		break;
	case sds_SoundBlaster:
		SDL_SBStopSample();
		break;
	}

asm	popf

	for (i = DigiLastStart;i < DigiLastEnd;i++)
		PM_SetPageLock(i + PMSoundStart,pml_Unlocked);
	DigiLastStart = 1;
	DigiLastEnd = 0;
}

void
SD_Poll(void)
{
	if (DigiLeft && !DigiNextAddr)
	{
		DigiNextLen = (DigiLeft >= PMPageSize)? PMPageSize : (DigiLeft % PMPageSize);
		DigiLeft -= DigiNextLen;
		if (!DigiLeft)
			DigiLastSegment = true;
		DigiNextAddr = SDL_LoadDigiSegment(DigiPage++);
	}
	if (DigiMissed && DigiNextAddr)
	{
		SDL_PlayDigiSegment(DigiNextAddr,DigiNextLen);
		DigiNextAddr = nil;
		DigiMissed = false;
		if (DigiLastSegment)
		{
			DigiPlaying = false;
			DigiLastSegment = false;
		}
	}
	SDL_SetTimerSpeed();
}

void
SD_SetPosition(int leftpos,int rightpos)
{
	if
	(
		(leftpos < 0)
	||	(leftpos > 15)
	||	(rightpos < 0)
	||	(rightpos > 15)
	||	((leftpos == 15) && (rightpos == 15))
	)
		Quit("SD_SetPosition: Illegal position");

	switch (DigiMode)
	{
	case sds_SoundBlaster:
		SDL_PositionSBP(leftpos,rightpos);
		break;
	}
}

void
SD_PlayDigitized(word which,int leftpos,int rightpos)
{
	word	len;
	memptr	addr;

	if (!DigiMode)
		return;

	SD_StopDigitized();
	if (which >= NumDigi)
		Quit("SD_PlayDigitized: bad sound number");

	SD_SetPosition(leftpos,rightpos);

	DigiPage = DigiList[(which * 2) + 0];
	DigiLeft = DigiList[(which * 2) + 1];

	DigiLastStart = DigiPage;
	DigiLastEnd = DigiPage + ((DigiLeft + (PMPageSize - 1)) / PMPageSize);

	len = (DigiLeft >= PMPageSize)? PMPageSize : (DigiLeft % PMPageSize);
	addr = SDL_LoadDigiSegment(DigiPage++);

	DigiPlaying = true;
	DigiLastSegment = false;

	SDL_PlayDigiSegment(addr,len);
	DigiLeft -= len;
	if (!DigiLeft)
		DigiLastSegment = true;

	SD_Poll();
}

void
SDL_DigitizedDone(void)
{
	if (DigiNextAddr)
	{
		SDL_PlayDigiSegment(DigiNextAddr,DigiNextLen);
		DigiNextAddr = nil;
		DigiMissed = false;
	}
	else
	{
		if (DigiLastSegment)
		{
			DigiPlaying = false;
			DigiLastSegment = false;
			if ((DigiMode == sds_PC) && (SoundMode == sdm_PC))
			{
				SDL_SoundFinished();
			}
			else
				DigiNumber = DigiPriority = 0;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本丶国产丶欧美色综合| 色狠狠色噜噜噜综合网| 91亚洲国产成人精品一区二三| 在线一区二区三区| 国产亚洲精品7777| 三级一区在线视频先锋| av在线免费不卡| 日韩一区二区三区四区| 一区二区三区影院| 风间由美性色一区二区三区| 69成人精品免费视频| 一区二区国产盗摄色噜噜| 国产精品1区2区| 日韩精品专区在线| 日韩不卡一二三区| 欧美日韩国产高清一区二区| 亚洲免费观看高清在线观看| 国产成都精品91一区二区三| 精品噜噜噜噜久久久久久久久试看| 亚洲v精品v日韩v欧美v专区 | 欧美一级黄色片| 亚洲人午夜精品天堂一二香蕉| 国产成人av一区二区三区在线观看| 欧美一区二区三区不卡| 日韩高清在线一区| 欧美日本一道本| 午夜久久电影网| 欧美日韩你懂得| 性感美女极品91精品| 欧美三级韩国三级日本三斤| 亚洲美女精品一区| 一本色道久久综合亚洲aⅴ蜜桃 | 中文字幕一区二区视频| 久久电影国产免费久久电影| 欧美一区二区三区日韩| 天堂va蜜桃一区二区三区漫画版| 欧美优质美女网站| 亚洲综合视频在线观看| 91久久精品一区二区三| 亚洲精品国产无套在线观| 一本色道久久综合亚洲91| 亚洲一区二区三区四区在线| 欧美日韩一区二区在线观看视频| 五月激情六月综合| 91精品欧美福利在线观看| 麻豆久久久久久| 国产三级精品三级在线专区| fc2成人免费人成在线观看播放| 欧美国产一区视频在线观看| 99国产精品久久久| 亚洲成人777| 亚洲精品一区二区三区在线观看 | 久久久激情视频| caoporn国产精品| 洋洋成人永久网站入口| 在线播放中文一区| 国产一区二区中文字幕| 亚洲欧洲国产日本综合| 欧美日韩成人综合天天影院| 精品一区在线看| 国产精品免费视频一区| 欧美午夜寂寞影院| 精品亚洲国内自在自线福利| 国产精品国产精品国产专区不片| 欧美在线观看视频一区二区| 激情成人综合网| 亚洲乱码中文字幕| 久久综合国产精品| 欧美综合天天夜夜久久| 国产曰批免费观看久久久| 亚洲乱码一区二区三区在线观看| 日韩欧美国产一二三区| 色欧美片视频在线观看在线视频| 蜜臀av国产精品久久久久| 亚洲特级片在线| 精品国产乱码久久久久久浪潮| 91免费看`日韩一区二区| 麻豆精品在线观看| 洋洋成人永久网站入口| 国产丝袜欧美中文另类| 欧美一区二区三区免费观看视频 | 欧美日本视频在线| 成人爽a毛片一区二区免费| 五月天丁香久久| 亚洲精品伦理在线| 中文字幕乱码亚洲精品一区| 日韩一级黄色大片| 欧美丝袜丝交足nylons图片| 99久久精品国产导航| 狠狠狠色丁香婷婷综合久久五月| 亚洲成在人线在线播放| 亚洲天堂福利av| 国产精品网站一区| 精品国产免费一区二区三区四区| 欧美三区在线观看| 色婷婷av一区二区| 91视频在线观看免费| 国产成人超碰人人澡人人澡| 激情综合网av| 九九九久久久精品| 秋霞午夜av一区二区三区| 亚洲午夜精品一区二区三区他趣| 成人免费在线视频观看| 国产精品午夜在线观看| 久久久久久久综合| 久久久综合视频| 精品成人免费观看| 精品国产伦一区二区三区观看方式| 欧美视频第二页| 欧美日韩国产免费一区二区| 精品视频在线看| 欧美美女bb生活片| 51精品秘密在线观看| 欧美精品xxxxbbbb| 欧美日韩国产中文| 91.xcao| 欧美一区二区三区四区久久 | 日韩精品乱码av一区二区| 一区二区三区久久| 亚洲一本大道在线| 日韩和欧美一区二区三区| 丝袜亚洲精品中文字幕一区| 天堂成人免费av电影一区| 青青青爽久久午夜综合久久午夜| 免费成人小视频| 国内精品久久久久影院色| 国产精品18久久久久久vr| 国产高清不卡一区| 91丨porny丨国产入口| 欧美日韩一区视频| 日韩亚洲欧美成人一区| 欧美精品一区二区久久久| 国产日韩精品一区二区三区| 综合久久久久久久| 亚洲国产精品视频| 久久av资源站| 成人性生交大片| 欧美在线短视频| 精品国偷自产国产一区| 国产女主播一区| 一区二区三区中文字幕| 日本vs亚洲vs韩国一区三区| 国产精品白丝jk白祙喷水网站| 色综合天天狠狠| 欧美大肚乱孕交hd孕妇| 136国产福利精品导航| 视频一区免费在线观看| 国产成人午夜片在线观看高清观看| 91欧美激情一区二区三区成人| 91麻豆精品国产自产在线| 国产视频一区二区三区在线观看| 亚洲精品ww久久久久久p站| 蜜桃av一区二区三区| 北岛玲一区二区三区四区| 欧美二区三区的天堂| 中文字幕免费观看一区| 日韩—二三区免费观看av| 成人性生交大片免费看视频在线| 在线播放国产精品二区一二区四区| 国产三级欧美三级日产三级99 | 久久成人18免费观看| 不卡一区中文字幕| 日韩一二三区不卡| 一区二区三区色| 福利一区二区在线观看| 日韩视频免费观看高清完整版 | 99国产精品国产精品久久| 日韩免费性生活视频播放| 亚洲欧美日韩一区二区三区在线观看| 美女脱光内衣内裤视频久久影院| 99国产精品久久久久久久久久久| 欧美xxxxxxxx| 亚洲国产日日夜夜| caoporn国产精品| 久久人人爽人人爽| 美洲天堂一区二卡三卡四卡视频 | 日韩精品一二区| 91福利视频在线| 国产精品初高中害羞小美女文| 九九在线精品视频| 欧美一区二区三区视频免费播放| 一区二区三区中文在线| 91在线丨porny丨国产| 国产日韩欧美麻豆| 国精产品一区一区三区mba视频 | 欧美日韩亚洲另类| 亚洲免费在线观看视频| 91亚洲精华国产精华精华液| 中文在线一区二区| 国产成人免费视频网站| 久久久亚洲精品一区二区三区 | 不卡欧美aaaaa| 欧美高清在线一区| 风间由美一区二区三区在线观看 | 国产欧美日韩精品a在线观看| 麻豆91精品视频| 日韩欧美中文字幕公布| 日本不卡123| 3d动漫精品啪啪1区2区免费| 午夜精彩视频在线观看不卡|