📄 audio.h
字号:
/***************************************************************************
Audio.h - Audio Engine Header
Version : 1.5.7
-------------------
copyright : (C) 2003 by FluXy
email : clubjafa@web.de
website : http://sourceforge.net/projects/smclone/
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#include "include\globals.h"
#ifndef __AUDIO_H__
#define __AUDIO_H__
#define AUDIO_MAX_SOUNDS 15
class cAudio
{
public:
cAudio();
~cAudio(void);
void InitAudio(void);
void PlaySound(char *filename,int channel = -1);
void PlayMusik(char *filename,int loops = 0,bool force = 1); // if no forcing it will be played after the current Music file
void StopMusic(void); // Stops playing Music
void StopSounds(void); // stops all sounds
void SetSoundsVolume(Uint8 iVolume);
void SetMusicVolume(Uint8 iVolume);
void Update();
Mix_Music *Music;
Mix_Chunk *Sound[AUDIO_MAX_SOUNDS];
int iAudio_Hz,iAudio_Buffer;
int Sounds_Played,Music_Played,SCounter;
Uint8 Sound_Volume,Music_Volume;
bool bSounds,bMusic,Audio_Debug;
bool bAudio_Initialised;
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -