-
Notifications
You must be signed in to change notification settings - Fork 4
/
SoundObj.h
40 lines (32 loc) · 1.06 KB
/
SoundObj.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef __SoundObj_h_
#define __SoundObj_h_
#include "SceneObj.h"
#include "fmod.hpp"
#include "fmod.h"
class SceneSoundObj : public SceneObj
{
public:
SceneSoundObj(int tag,Ogre::String mediaPath);
~SceneSoundObj();
virtual bool frameStarted(const Ogre::FrameEvent &evt);
int mSoundType; //1代表2d声音,2代表3d声音//
FMOD::Sound *mSound;
FMOD::Channel *mChannel;
int mPriority; //优先级from 0 (most important) to 256 (least important), default = 128//
bool bLoop; //是否循环播放//
float mValume; //声音大小0-1//
SceneObj* mBingObj; //可以绑定到场景物体//
long meshTag; //绑定物体的tag//
virtual void setPosition(Vector3 &pos);
virtual void setScale(Vector3 &scale);
virtual void setRotaion(Vector3 &rotaion);
virtual void onUpdateValueChange(int tag);
void setSoundType(int type);
void setLoop(bool bloop);
void setBingObj(SceneObj *obj);
void setPriority(int priority);
void setValume(float val);
protected:
private:
};
#endif // #ifndef __SceneObj_h_