2016-05-02 18:16:26 -07:00
|
|
|
#ifndef __AMUSE_EMITTER_HPP__
|
|
|
|
#define __AMUSE_EMITTER_HPP__
|
|
|
|
|
|
|
|
#include "Entity.hpp"
|
2016-05-13 23:33:21 -07:00
|
|
|
#include <memory>
|
2016-05-02 18:16:26 -07:00
|
|
|
|
|
|
|
namespace amuse
|
|
|
|
{
|
|
|
|
class Voice;
|
|
|
|
|
|
|
|
using Vector3f = float[3];
|
|
|
|
|
2016-05-18 22:55:10 -07:00
|
|
|
/** Voice wrapper with positional-3D level control */
|
2016-05-02 18:16:26 -07:00
|
|
|
class Emitter : public Entity
|
|
|
|
{
|
2016-05-13 23:33:21 -07:00
|
|
|
std::shared_ptr<Voice> m_vox;
|
|
|
|
|
|
|
|
friend class Engine;
|
|
|
|
void _destroy();
|
2016-05-02 18:16:26 -07:00
|
|
|
public:
|
2016-05-14 15:38:37 -07:00
|
|
|
~Emitter();
|
2016-05-13 23:33:21 -07:00
|
|
|
Emitter(Engine& engine, const AudioGroup& group, std::shared_ptr<Voice>&& vox);
|
2016-05-02 18:16:26 -07:00
|
|
|
|
|
|
|
void setPos(const Vector3f& pos);
|
|
|
|
void setDir(const Vector3f& dir);
|
|
|
|
void setMaxDist(float maxDist);
|
|
|
|
void setMaxVol(float maxVol);
|
|
|
|
void setMinVol(float minVol);
|
|
|
|
void setFalloff(float falloff);
|
2016-05-13 23:33:21 -07:00
|
|
|
|
|
|
|
std::shared_ptr<Voice>& getVoice() {return m_vox;}
|
2016-05-02 18:16:26 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // __AMUSE_EMITTER_HPP__
|