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

📄 sound.h

📁 一个3D的保龄球的源代码
💻 H
字号:
/*
* ============================================================================
*  Name     : CSound
*  Part of  : Game
*  Created  : 2003-09-03 by Zheng Jie Sheng
*  Implementation notes:
*     Sound module of LG6000
*  Version  :
*  Copyright: Gameloft S.A.
*
* ============================================================================
*/

#if !defined(AFX_SOUND_H__BAA4CF77_0C12_4D44_982A_16A76D342B8E__INCLUDED_)
#define AFX_SOUND_H__BAA4CF77_0C12_4D44_982A_16A76D342B8E__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#ifdef BREW11
#include "AEESoundPlayer.h"
#else
#include "AEEMedia.h"         // AEE Multimedia Services
#include "AEEMediaUtil.h"     // AEE Media Utility functions
#endif

#define SOUND_LOOPMUSIC		1
#define SOUND_MUSICEND		2
#define SOUND_SILENT		4
#define SOUND_PLAYING		8
#define SOUND_INQUEUE		16
#define SOUND_PAUSE			32

#define RECORD_SIZE  500


class CEngine;

class CSound  
{
public:
	void SetVibOn(char cVibOn);
	char GetVibOn(){return vibOn;};
	void PlayVibrate(int timeTick=1000);

	CSound(CEngine *pEngine);

	virtual ~CSound();


	int				flag;

	bool soundInit();

	void playMIDI( int id, int loop = false );

	void stopMIDI();

	void Update();

	bool loadMIDI( int soundID, const char *file);


	enum SOUND_VOL{
		soundNone=0,
			soundLow,
			soundMid,
			soundLoud
	};

	char		playerSoundOn;

	int	m_soundVolume;
	int			lastMidi;
	int			nextMidi;
	long nextMidiStartTick;	
private:

	CEngine	*		m_pEngine;
#ifdef BREW11
	ISoundPlayer *    m_pSoundPlayer;
#else

	IMedia *		m_pMedia;

	AEEMediaData      m_md;             // Media data
#endif

	ISound *m_pISound; // Milo 12-23

	void*			pMediaData[SOUND_NUMBER];

	int				nDataSize[SOUND_NUMBER];

	int				lastMusic;

	int				mode;

	char			vibOn;

	int			normalID;		//normal sound, can be stopped by next sound id

	int			importantID;	//important sound ID, cann't be stoped by normal ID, 
									//but can be stopped by important id

	int			titleMusicID;

	int			importantPlaying;	//important snd are playing

	bool			titleMusicPlaying;

	int			stop;

	long			lastTime;

	int				m_pauseMidi;
	int				m_pauseFlag;

public:
	void SetVolume(int eVolumeType);
	void StopVibrate();
	void ResumeMIDI();
	void pauseMIDI();
	int idebug;

};

#endif // !defined(AFX_SOUND_H__BAA4CF77_0C12_4D44_982A_16A76D342B8E__INCLUDED_)

⌨️ 快捷键说明

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