directsound.h

来自「C人工智能游戏开发的一些实例源代码 C Game development in 」· C头文件 代码 · 共 40 行

H
40
字号
//----------------------------------------------------------------------------------------------
// Sequential Prediction Demo: The positioning pattern
// 
// Author:  Fri Mommersteeg
// Date:    10-09-2001
// File:    DirectSound.h
//----------------------------------------------------------------------------------------------

#ifndef __DIRECTSOUND_H
#define __DIRECTSOUND_H

//----------------------------------------------------------------------------------------------
// Global type definitions (new version independant names for weird DX identifiers)
//----------------------------------------------------------------------------------------------

typedef LPDIRECTSOUND			LPDS;
typedef LPDIRECTSOUNDBUFFER		LPDSB;
typedef LPDIRECTSOUNDNOTIFY		LPDSN;
typedef DSBUFFERDESC			DSBD;
typedef DSBPOSITIONNOTIFY		DSBPN;

//----------------------------------------------------------------------------------------------
// External declarations
//----------------------------------------------------------------------------------------------

extern LPDS			lpds;

//----------------------------------------------------------------------------------------------
// Exported functions
//----------------------------------------------------------------------------------------------

extern BOOL InitDS(DWORD dwSamplesPerSec = 22050, WORD nChannels = 1, WORD nBitsPerSample = 16);
extern void ShutdownDS();
extern void FillWaveFormat(WAVEFORMATEX * wfx, DWORD dwSamplesPerSec, WORD nChannels, WORD nBitsPerSample);
extern void MatchPrimaryBuffer(WAVEFORMATEX * pwfx);

//----------------------------------------------------------------------------------------------

#endif // __DIRECTSOUND_H

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?