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

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

?? dsapi.h

?? 赤壁之戰的游戲源代碼
?? H
字號:
/*==========================================================================
 *
 *  Copyright (C) 1995 Microsoft Corporation. All Rights Reserved.
 *	Source		:	DSstream.h
 *  File		:	DsApi.h
 *	Edited by	:	Liu Gang
 *	Version		:	V0023
 *	V0010		:	Oct.8.1996
 *	V0011		:	Nov.25.1996
 *	V0012		:	Apr.1.1997, add IfPlaying() function to classes
 *	V0020		:	Apr.2.1997, fixed a bug when playing static sound, 
 *								do not use Mutex with static wave objects
 *	V0021		:	May.2.1997, add function DS_IfSoundEnable()
 *	V0022		:	May.10.1997, fixed a bug in IfPlaying(), close the sound if the sound is end
 *	V0023		:	May.15.1997, fixed bugs when quit and init sound frequently
 *	V0024		:	Aug.13.1997, fixed a bug when playing
 *  Content:    DirectSound untilities Header
 *
 ***************************************************************************/
#ifndef __DSAPI_H__
#define __DSAPI_H__

///////////////////
#include <mmsystem.h>
#include <dsound.h>
///////////////////

// error id
#define	DS_ERROR_ID		300

/* WARNING -- Be careful about changing NUM_BUFFER_SEGMENTS -- it should be at
 * least 3, or there will probably not be enough time for the interrupt to do
 * its thing before the player catches up to it.  Also, PLAYBACK_TIMER_PERIOD
 * is set at 200 milliseconds because we are OVERSAMPLING by a factor of four.
 * This is so we can shift the frequency on the fly and still keep up with the
 * play cursor.  The timer routine will only fill when necessary.  Experiments
 * have shown that the timer still operates well when interrupted every 50ms
 * (and possibly even more often than that).  If you do not require real-time
 * frequency changes, you reduce the OVERSAMPLE as well as the TIMER_PERIOD.
 * However, note that since a buffer segment is only an approximation of the
 * number of bytes played per interrupt, it's a good idea to interupt a bit more
 * often than the TIMER_PERIOD, just to make sure the timer isn't falling behind
 * the player.  If your frequency is fixed, the call to initialize the timer
 * event could be changed to first calculate something like (TIMER_PERIOD * .8).
 * This should ensure that the buffer is well maintained and system performance
 * is maximized.
 */

// macros
///////////////////
// sound device params
#define	DS_WAVE_FORMAT_AUTO			0
//#define	DS_WAVE_FORMAT_1_11_8		1
//#define	DS_WAVE_FORMAT_1_11_16		2
//#define	DS_WAVE_FORMAT_1_22_8		3
//#define	DS_WAVE_FORMAT_1_22_16		4
//#define	DS_WAVE_FORMAT_1_44_8		5
//#define	DS_WAVE_FORMAT_1_44_16		6
//#define	DS_WAVE_FORMAT_2_11_8		7
//#define	DS_WAVE_FORMAT_2_11_16		8
#define	DS_WAVE_FORMAT_2_22_8		9
#define	DS_WAVE_FORMAT_2_22_16		10
//#define	DS_WAVE_FORMAT_2_44_8		11
//#define	DS_WAVE_FORMAT_2_44_16		12


// dynamic wave parameters
#define NUM_BUFFER_SEGMENTS     6
#define PLAYBACK_TIMER_PERIOD   200
#define PLAYBACK_OVERSAMPLE     4
#define PLAYBACK_TIMER_ACCURACY 10

//#define DSSTREAM_STOPF_NOREOPEN 0x0001

// errors returned by StreamBufferSetup()
#define ERR_WAVE_OPEN_FAILED		(DS_ERROR_ID+10)
#define ERR_WAVE_INVALID_FORMAT		(DS_ERROR_ID+11)
#define ERR_CREATEDSB_FAILED		(DS_ERROR_ID+12)
#define ERR_WAVE_CORRUPTED_FILE		(DS_ERROR_ID+13)
#define	ERR_CREATEDSB_LOST			(DS_ERROR_ID+14)
#define	ERR_WAVE_FORMAT_INVALID		(DS_ERROR_ID+15)
// The values for PAN may change in range...

//#define PAN_TB_MIN              0
//#define PAN_TB_MAX              2000
//#define PAN_TB_CENTER           1000
//#define PAN_MULTIPLIER          1
#define PAN_MIN                 0
#define PAN_MAX                 800
#define PAN_CENTER              400
//#define PAN_SHIFT               (-400)
//#define PAN_PAGESIZE            10
//#define PAN_DIV                 10
//#define PAN_MULT                10

//#define PAN_DSB_MIN           (-400)
//#define PAN_DSB_MAX           400
//#define PAN_DSB_CENTER        0

//#define VOL_TB_MIN              0
//#define VOL_TB_MAX              1000
//#define VOL_MULTIPLIER          1
//#define VOL_SHIFT               (-400)
#define VOL_MIN                 -5000
#define VOL_MAX                 0
//#define VOL_PAGESIZE            10
//#define VOL_DIV                 10
//#define VOL_MULT                10
//#define FREQ_MIN                441
//#define FREQ_MAX                4410
//#define FREQ_PAGESIZE           100
//#define FREQ_MULTIPLIER         10
//#define PROG_MIN                0
//#define PROG_MAX                10000
//#define PROG_MULTIPLIER         100

// wave playing flags
#define WM_DSSTREAM_DONE        WM_USER + 0x100 /* Make our own app messages */
#define WM_DSSTREAM_DEBUG       WM_USER + 0x101
#define WM_DSSTREAM_PROGRESS    WM_USER + 0x102
///////////////////

// global controls
///////////////////
// the number of stream and static buffers you are actually using 
// will consume 30% CPU time.
// stream sound buffers cannot be more than 8, less than 2 is better.
#define	WAVE_OBJECT_MAX		8

// static sound buffers can be any, change 64 to the number you want,
// but less than 8 is better.
#define	WAVE_OBJECT_MAXS	64
#define	WAVE_OBJECT_NONE	-1
//////////////////

// dynamic wave object
//////////////////
// if you want to play a very long wave file, you'd better use this class
/*
 * This structure keeps all the data that the TimeFunc callback uses in one
 * place.  In this implementation, that means the global data segement.  This
 * is setup so that if you wanted to put your callback in a DLL, all you'd need
 * to do is pass the address of this structure as a parameter.
 */
typedef class CDynamicWave
{
public:
    WAVEFORMATEX         *pwfx;             /* Wave Format data structure */
    HMMIO                hmmio;             /* MM I/O handle for the WAVE */
    MMCKINFO             mmck;              /* Multimedia RIFF chunk */
    MMCKINFO             mmckInRIFF;        /* Use in opening a WAVE file */
    LPDIRECTSOUNDBUFFER  lpDSBStreamBuffer; /* Points to DirectSoundBuffer */
    DWORD                dwBufferSize;      /* Size of the entire buffer */
    DWORD                dwBufferSegSize;   /* Size of one buffer segment */
    DWORD                dwNextWriteOffset; /* Offset to next buffer segment */
    DWORD                dwPlayLast;        /* Stores last play cursor */
    DWORD                dwProgress;        /* Used with above to show prog. */
    BOOL                 bDonePlaying;      /* Signals early abort to timer */
    BOOL                 bLoopFile;         /* Should we loop playback? */
    BOOL                 bFoundEnd;         /* Timer found file end */
    int                  nRemainingSegments;/* Segments 'til timer shutdown */

	int		nID;							/* ID, if not equals to WAVE_OBJECT_NONE,
											the wave file is opened */
	char	strFileName[65];				/* wave file name */
	BOOL    bPlaying, bTimerInstalled;	/* if wave file is playing, 
										timer has been installed*/
	UINT    uTimerID, uLastPercent;		/* timer ID and percent has been played */

public:
	// functions
	CDynamicWave();
	~CDynamicWave();

private:
	// load sound buffer
	// filename		:	wave file name
	// return value	:	TRUE if succeeded
	BOOL Load( LPCTSTR filename );	

	// release sound buffer
	void Close();					

public:
	// play wave file
	// dwFlags		:	TRUE if looping
	// pos			:	position to play from
	// return value	:	TRUE if played
	// if this object is playing, stop and playing again
	BOOL Play( DWORD dwFlags=DSBPLAY_LOOPING, DWORD pos=0 );

	// reset wave player, avoid to use
	void Reset();

	// stop playing
	// if has stoped, no effects
	void Stop();

	// test if the sound is playing
	// returns TRUE if playing
	BOOL IfPlaying(){ return bPlaying; }

	// to make the sound lower and lower
	// return value	:	TRUE if succeeded
	BOOL FadeOut();				

	// to make the sound louder and louder
	// return value	:	TRUE if succeeded
	BOOL FadeIn();				

} WAVEDYNAMIC, *LPWAVEDYNAMIC;
//////////////////

// static wave object
//////////////////
// if the wave file is short, use this class
// struct CStaticWave
typedef	class	CStaticWave
{
public:
	char	strFileName[65];				/* wave file name */
	int		nID;							/* ID, if not equals to WAVE_OBJECT_NONE,
											the wave file is opened */
    WAVEFORMATEX      *pwfx;				/* Wave Format data structure */
    UINT	cbSize;							/* Size of the entire buffer */
    BOOL    bLoopFile;						/* Should we loop playback? */
	BOOL    bPlaying;						/* if wave file is playing */
    LPDIRECTSOUNDBUFFER  lpDSBStreamBuffer; /* Points to DirectSoundBuffer */
	BYTE	* pbData;

public:
	CStaticWave();
	~CStaticWave();
private:
	// load sound buffer
	// filename		:	wave file name
	// return value	:	TRUE if succeeded
	BOOL Load( LPCTSTR filename );

	// release sound buffer
	void Close();

public:
	// dwFlags		:	TRUE if looping
	// pos			:	position to play from
	// return value	:	TRUE if played
	// if this object is playing, stop and playing again
	// Warning:	a bug report here: the last sound in segment buffer 
	//          cannot be played, so you need the file larger than 
	//          normal at last, with a period of slience.
	BOOL Play( DWORD dwFlags=DSBPLAY_LOOPING, DWORD pos=0 );

	// stop playing
	// if has stoped, no effects
	void Stop();

	// test if the sound is playing
	// returns TRUE if playing
	BOOL IfPlaying();
}	WAVESTATIC, *LPWAVESTATIC;

//////////////////

// Global Function declarations
//////////////////
// global functions for sound object

// initialize sound device
// hwnd			:	handle of window to receive error messages
// nType		:	wave format, 
//					default if do not want to change params of waves
// return value	:	TRUE if succeeded
BOOL DS_InitSound( HWND hwnd, int nType = DS_WAVE_FORMAT_AUTO );

// release sound device
void DS_QuitSound( void ); 

// enable or disable sound effects
// bEnable		:	TRUE for enable sound
// return value	:	old state of sound, enable or disable
BOOL DS_EnableSound( BOOL bEnable );

// test if sound is enable
BOOL DS_IfSoundEnable();

// set fade in or fade out
#define	DS_FADE_NONE	0
#define	DS_FADE_IN		1
#define	DS_FADE_OUT		2
// nFade		:	fade mode, see above
// return value	:	old fade mode
// this function will take effect, only when playing dynamic wave file
// cannot fade in or fade out static wave playing
int	DS_FadeSound( int nFadeMode );

// set volume
// real range is from 0 to -10000,
// this function is range from 0 to -5000
// under -3200 I cannot hear at all
// nVol			:	volume of the sound device
// return value	:	old volume of the sound device, -1 if error occurs
int	DS_VolumeSound( int nVol );

// set pan
// real range is from -10000 to 10000, 
// but this function is range from -2000 to 2000
// larger than 1000, right cannot hear
// smaller than -1000 left cannot hear
// nPan			:	pan value for the sound device
// return value	:	old pan value for the sound device
int	DS_PanSound( int nPan );

// get sound volume
extern int DS_GetVolume();
//////////////////
#endif /* __DSAPI_H__ */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美高清精品3d| 亚洲视频免费观看| 丝袜美腿成人在线| 91精品国产乱| 久久99国产精品尤物| 精品久久久久久久久久久久久久久| 美女尤物国产一区| 精品国产乱码久久久久久浪潮| 极品美女销魂一区二区三区| 精品国产凹凸成av人导航| 国产精品99久久久| 综合久久久久久| 欧美亚日韩国产aⅴ精品中极品| 午夜精品福利在线| 欧美精品丝袜久久久中文字幕| 7777女厕盗摄久久久| 美女高潮久久久| 国产精品情趣视频| 色噜噜狠狠色综合欧洲selulu| 亚洲一线二线三线久久久| 欧美精品在线一区二区三区| 国产毛片精品视频| 91一区二区三区在线播放| 不卡一卡二卡三乱码免费网站| 欧美麻豆精品久久久久久| 美女网站视频久久| 亚洲图片另类小说| 日韩欧美成人午夜| www.日本不卡| 日韩黄色免费电影| 国产精品天天看| 制服丝袜国产精品| 99精品久久免费看蜜臀剧情介绍| 日韩精品视频网| 国产精品成人在线观看| 欧美一区二区三区精品| www.亚洲免费av| 久热成人在线视频| 一区二区三区精品在线观看| 精品国产电影一区二区| 欧美性生活久久| 国产成人av自拍| 日本视频中文字幕一区二区三区| 国产精品色在线观看| 制服丝袜亚洲网站| 色综合中文字幕国产 | 欧美精品一区二区在线播放| 不卡一区二区中文字幕| 久久国产婷婷国产香蕉| 一区二区三区在线影院| 日本一区二区三区久久久久久久久不 | 日韩成人伦理电影在线观看| 国产亚洲精品中文字幕| 88在线观看91蜜桃国自产| 96av麻豆蜜桃一区二区| 国产福利精品导航| 日本欧美在线观看| 亚洲电影第三页| 一区二区三区四区激情| 亚洲欧洲另类国产综合| 国产日韩欧美电影| 久久亚洲精精品中文字幕早川悠里| 欧美色视频在线观看| 色婷婷久久久综合中文字幕| av不卡在线播放| 成人精品视频.| 91美女片黄在线| 国产精品一区二区在线看| 六月丁香婷婷久久| 性感美女极品91精品| 午夜精品久久久久久久99樱桃| 亚洲精品乱码久久久久久黑人 | 日韩欧美成人一区二区| 欧美人狂配大交3d怪物一区| 欧美艳星brazzers| 色成人在线视频| 97久久超碰国产精品电影| 成人av先锋影音| 成人免费高清视频| 91网上在线视频| 色婷婷综合久色| 日本韩国一区二区三区视频| 色欧美片视频在线观看| 欧美亚一区二区| 欧美精三区欧美精三区| 在线播放国产精品二区一二区四区 | 久久免费电影网| 久久久久久免费网| 中文字幕国产一区| 亚洲免费在线播放| 亚洲成人一区在线| 青青草精品视频| 国产成人av电影| 本田岬高潮一区二区三区| 成人开心网精品视频| 91精品福利在线| 欧美一区二区三区四区久久| 精品日韩在线一区| 久久―日本道色综合久久| 国产精品嫩草久久久久| 一区二区三区国产豹纹内裤在线 | 婷婷亚洲久悠悠色悠在线播放 | 国产精品99久久久久久似苏梦涵 | 国产成人鲁色资源国产91色综| 成人在线视频一区| 色婷婷香蕉在线一区二区| 欧美日韩五月天| 欧美变态凌虐bdsm| 国产精品福利av| 日韩精品乱码av一区二区| 国产美女主播视频一区| 91蝌蚪porny九色| 日韩欧美www| 亚洲欧美日韩一区二区三区在线观看| 亚洲成va人在线观看| 国精产品一区一区三区mba视频| 99久久99久久综合| 欧美一二三在线| 成人欧美一区二区三区| 美国十次综合导航| 91免费视频网| 精品国产精品网麻豆系列| 亚洲欧美激情视频在线观看一区二区三区 | 日韩一区二区精品在线观看| 欧美激情在线观看视频免费| 亚洲综合在线电影| 久久国产夜色精品鲁鲁99| 色视频一区二区| 精品久久99ma| 亚洲国产视频一区二区| 成人小视频免费在线观看| 日韩午夜精品视频| 悠悠色在线精品| 成人夜色视频网站在线观看| 欧美一区二区三区系列电影| 亚洲欧洲制服丝袜| 国产剧情av麻豆香蕉精品| 欧美日韩一区二区在线观看 | 亚洲人成亚洲人成在线观看图片| 蜜臀va亚洲va欧美va天堂| 一本色道**综合亚洲精品蜜桃冫| 久久视频一区二区| 全国精品久久少妇| 欧美日韩大陆在线| 亚洲一区二区在线视频| 成人福利视频在线| 国产调教视频一区| 久久福利资源站| 欧美一区二区三区思思人| 亚洲大片在线观看| 91国在线观看| 亚洲日本一区二区| 丁香六月综合激情| 中文字幕欧美国产| 国产精品一区二区三区99| 精品人在线二区三区| 日韩精品成人一区二区在线| 在线亚洲免费视频| 一区二区在线免费观看| 99精品视频在线免费观看| 国产精品网曝门| 波多野结衣中文字幕一区| 国产日韩av一区| 高清不卡在线观看| 国产精品嫩草99a| 懂色av中文字幕一区二区三区| 欧美精品一区二区高清在线观看| 免费看欧美美女黄的网站| 欧美一级日韩一级| 人禽交欧美网站| 欧美mv日韩mv| 国产成人三级在线观看| 国产精品视频观看| 99vv1com这只有精品| 亚洲欧美在线另类| 色婷婷亚洲婷婷| 午夜精品久久久久久不卡8050| 欧美一区二区视频在线观看2020 | 天天综合天天综合色| 91精品欧美综合在线观看最新| 日本亚洲三级在线| 欧美电影免费观看高清完整版在线| 蜜臀99久久精品久久久久久软件| 日韩一区二区在线看| 国产一区二区中文字幕| 国产日韩av一区| 91老师片黄在线观看| 亚洲v日本v欧美v久久精品| 欧美一卡2卡三卡4卡5免费| 精品亚洲成a人在线观看| 欧美国产禁国产网站cc| 一本高清dvd不卡在线观看| 亚洲成人在线网站| 久久先锋影音av| 99re热视频这里只精品| 亚洲国产精品久久一线不卡| 2欧美一区二区三区在线观看视频| 国产不卡高清在线观看视频| 亚洲乱码中文字幕| 91精品国产91热久久久做人人|