mrsoundplayer.h

来自「Games programming all in one code chapte」· C头文件 代码 · 共 40 行

H
40
字号
 /* 'mrSoundPlayer.h' */

 /* Mirus base types header */
#include "mrDatatypes.h"
 /* Mirus error definitions header */
#include "mrError.h"
 /* Windows header file */
#include <windows.h>
 /* Direct Music header file */
#include <dsound.h>
/* Assert header file */
#include <assert.h> 

 /* Include this file only once */
#pragma once

 /* Mirus Sound Player class */
class mrSoundPlayer
{
protected:
  /* DirectSound objects */
 LPDIRECTSOUND8         m_lpkDSound;

  /* Singleton */
 static mrSoundPlayer * m_pkSingleton;

public:
  /* Constructors / Destructor */
 mrSoundPlayer (void);
 ~mrSoundPlayer (void);

  /* Sound player manipulation routines */
 mrError32 Init (HWND hWindow);

  /* Sound player maintainance routines */
 LPDIRECTSOUND8 GetSound (void);

  /* Singleton */
 static mrSoundPlayer * GetSingleton (void);
};

⌨️ 快捷键说明

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