17 #ifndef _GAZEBO_OPENAL_HH_
18 #define _GAZEBO_OPENAL_HH_
24 #include <ignition/math/Vector3.hh>
25 #include <ignition/math/Pose3.hh>
33 #include "gazebo/gazebo_config.h"
38 struct ALCcontext_struct;
39 struct ALCdevice_struct;
60 private:
virtual ~
OpenAL();
64 public:
bool Load(sdf::ElementPtr _sdf = sdf::ElementPtr());
81 private: ALCcontext_struct *context;
84 private: ALCdevice_struct *audioDevice;
113 public:
bool SetPose(
const ignition::math::Pose3d &_pose);
126 public:
bool SetVelocity(
const ignition::math::Vector3d &_vel);
142 public:
bool Load(sdf::ElementPtr _sdf);
154 public:
bool SetPose(
const ignition::math::Pose3d &_pose);
167 public:
bool SetVelocity(
const ignition::math::Vector3d &_vel);
172 public:
bool SetPitch(
float _p);
177 public:
bool SetGain(
float _g);
182 public:
bool SetLoop(
bool _state);
189 public:
bool GetOnContact()
const;
194 public: std::vector<std::string> GetCollisionNames()
const;
199 public:
bool HasCollisionName(
const std::string &_name)
const;
205 public:
void Pause();
211 public:
void Rewind();
214 public:
bool IsPlaying();
221 public:
bool FillBufferFromPCM(uint8_t *_pcmData,
unsigned int _dataCount,
226 public:
void FillBufferFromFile(
const std::string &_audioFile);
229 private:
unsigned int alSource;
232 private:
unsigned int alBuffer;
236 private: std::vector<std::string> collisionNames;
boost::shared_ptr< OpenALSource > OpenALSourcePtr
Definition: UtilTypes.hh:46
Encapsulates a position and rotation in three space.
Definition: Pose.hh:37
The Vector3 class represents the generic vector containing 3 elements.
Definition: Vector3.hh:39
#define GAZEBO_DEPRECATED(version)
Definition: CommonTypes.hh:47
Singleton template class.
Definition: SingletonT.hh:33
#define GZ_UTIL_VISIBLE
Definition: system.hh:266
boost::shared_ptr< OpenALSink > OpenALSinkPtr
Definition: UtilTypes.hh:42
OpenAL Source.
Definition: OpenAL.hh:131
3D audio setup and playback.
Definition: OpenAL.hh:54
OpenAL Listener.
Definition: OpenAL.hh:95