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;
101 public:
virtual ~OpenALSink();
113 public:
bool SetPose(
const ignition::math::Pose3d &_pose);
120 public:
bool SetVelocity(
const math::Vector3 &_vel)
126 public:
bool SetVelocity(
const ignition::math::Vector3d &_vel);
134 public: OpenALSource();
137 public:
virtual ~OpenALSource();
142 public:
bool Load(sdf::ElementPtr _sdf);
154 public:
bool SetPose(
const ignition::math::Pose3d &_pose);
161 public:
bool SetVelocity(
const math::Vector3 &_vel)
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
Forward declarations for the common classes.
Definition: Animation.hh:33
#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