⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pgesound.h

📁 使ppc屏幕变成黑白的程序
💻 H
字号:
// PGESound.h: interface for the CPGESound class.
//
//////////////////////////////////////////////////////////////////////
#pragma once
#include "pgestd.h"
#include "PGEWaveFile.h"

#define PGE_SOUND_MAX 255

typedef struct tgaPgeSoundObj
{
	char caName[30];
	CPGEWaveFile* pWave;
	BYTE btFlag;
	BYTE btLoopTimes;
	HWAVEOUT hWaveOut;
	WAVEHDR whdr;
	DWORD dwVolume;
} PGESoundObj;

enum PGE_SOUND_FLAG
{
	PGE_SOUND_STOPED = 0,
		PGE_SOUND_PLAYING,
		PGE_SOUND_PAUSED

};

class CPGESound  : public CPGEBase
{
public:
	CPGESound();
	virtual ~CPGESound();

	PGE_RESULT LoadSound(char* caFileName, int iSoundIndex);
	PGE_RESULT Play(int iSoundIndex, BYTE btLoopTimes = 1, DWORD dwVolume = 0x7fff);
	void Play2(int iSoundIndex);
	PGE_RESULT Stop(int iSoundIndex);
	PGE_RESULT Pause(int iSoundIndex);
	PGE_RESULT Clear(int iSoundIndex);
	PGE_RESULT StopAll();
	PGE_RESULT PauseAll();
	PGE_RESULT ClearAll();
	PGE_RESULT VolumeCtrl(int iSoundIndex, DWORD dwVolume);
	
	BOOL isPlay(int iSoundIndex);
	PGESoundObj* m_pWaveObj[PGE_SOUND_MAX];
	
private:
	PGESoundObj* FindWave(int iSoundIndex);
	PGESoundObj* FindWave(char* caFileName);
	
	//static CALLBACK PlayedCall(DWORD dwParam);
	static void CALLBACK WaveProc( 
                                HWAVEOUT hwo, 
                                UINT uMsg, 
                                DWORD dwInstance, 
                                DWORD dwParam1, 
                                DWORD dwParam2 );

};

⌨️ 快捷键说明

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