17 #ifndef _GAZEBO_UTIL_OPENAL_HH_
18 #define _GAZEBO_UTIL_OPENAL_HH_
25 #include <ignition/math/Vector3.hh>
26 #include <ignition/math/Pose3.hh>
32 #include "gazebo/gazebo_config.h"
45 class OpenALSourcePrivate;
58 private:
virtual ~
OpenAL();
62 public:
bool Load(sdf::ElementPtr _sdf = sdf::ElementPtr());
80 public: std::set<std::string> DeviceList()
const;
84 private: std::unique_ptr<OpenALPrivate> dataPtr;
103 public:
bool SetPose(
const ignition::math::Pose3d &_pose);
108 public:
bool SetVelocity(
const ignition::math::Vector3d &_vel);
124 public:
bool Load(sdf::ElementPtr _sdf);
129 public:
bool SetPose(
const ignition::math::Pose3d &_pose);
134 public:
bool SetVelocity(
const ignition::math::Vector3d &_vel);
139 public:
bool SetPitch(
float _p);
144 public:
bool SetGain(
float _g);
149 public:
bool SetLoop(
bool _state);
164 public:
bool OnContact()
const;
170 public: std::vector<std::string> GetCollisionNames()
const
176 public: std::vector<std::string> CollisionNames()
const;
181 public:
bool HasCollisionName(
const std::string &_name)
const;
187 public:
void Pause();
193 public:
void Rewind();
196 public:
bool IsPlaying();
203 public:
bool FillBufferFromPCM(uint8_t *_pcmData,
unsigned int _dataCount,
208 public:
void FillBufferFromFile(
const std::string &_audioFile);
212 private: std::unique_ptr<OpenALSourcePrivate> dataPtr;
#define GAZEBO_DEPRECATED(version)
Definition: CommonTypes.hh:48
Singleton template class.
Definition: SingletonT.hh:33
std::shared_ptr< OpenALSource > OpenALSourcePtr
Definition: UtilTypes.hh:48
OpenAL Source.
Definition: OpenAL.hh:113
3D audio setup and playback.
Definition: OpenAL.hh:52
std::shared_ptr< OpenALSink > OpenALSinkPtr
Definition: UtilTypes.hh:44
OpenAL Listener.
Definition: OpenAL.hh:92