17 #ifndef _GAZEBO_OPENAL_HH_
18 #define _GAZEBO_OPENAL_HH_
29 #include "gazebo/gazebo_config.h"
34 struct ALCcontext_struct;
35 struct ALCdevice_struct;
56 private:
virtual ~
OpenAL();
60 public:
bool Load(sdf::ElementPtr _sdf = sdf::ElementPtr());
77 private: ALCcontext_struct *context;
80 private: ALCdevice_struct *audioDevice;
102 public:
bool SetPose(
const math::Pose &_pose);
123 public:
bool Load(sdf::ElementPtr _sdf);
128 public:
bool SetPose(
const math::Pose &_pose);
138 public:
bool SetPitch(
float _p);
143 public:
bool SetGain(
float _g);
148 public:
bool SetLoop(
bool _state);
155 public:
bool GetOnContact()
const;
160 public: std::vector<std::string> GetCollisionNames()
const;
165 public:
bool HasCollisionName(
const std::string &_name)
const;
171 public:
void Pause();
177 public:
void Rewind();
180 public:
bool IsPlaying();
187 public:
bool FillBufferFromPCM(uint8_t *_pcmData,
unsigned int _dataCount,
192 public:
void FillBufferFromFile(
const std::string &_audioFile);
195 private:
unsigned int alSource;
198 private:
unsigned int alBuffer;
202 private: std::vector<std::string> collisionNames;