17 #ifndef _GAZEBO_UTIL_OPENAL_HH_ 18 #define _GAZEBO_UTIL_OPENAL_HH_ 25 #include <ignition/math/Vector3.hh> 26 #include <ignition/math/Pose3.hh> 31 #include "gazebo/gazebo_config.h" 47 class OpenALSourcePrivate;
60 private:
virtual ~
OpenAL();
64 public:
bool Load(sdf::ElementPtr _sdf = sdf::ElementPtr());
82 public: std::set<std::string> DeviceList()
const;
86 private: std::unique_ptr<OpenALPrivate> dataPtr;
105 public:
bool SetPose(
const ignition::math::Pose3d &_pose);
110 public:
bool SetVelocity(
const ignition::math::Vector3d &_vel);
126 public:
bool Load(sdf::ElementPtr _sdf);
131 public:
bool SetPose(
const ignition::math::Pose3d &_pose);
136 public:
bool SetVelocity(
const ignition::math::Vector3d &_vel);
141 public:
bool SetPitch(
float _p);
146 public:
bool SetGain(
float _g);
151 public:
bool SetLoop(
bool _state);
158 public:
bool OnContact()
const;
163 public: std::vector<std::string> CollisionNames()
const;
168 public:
bool HasCollisionName(
const std::string &_name)
const;
174 public:
void Pause();
180 public:
void Rewind();
183 public:
bool IsPlaying();
190 public:
bool FillBufferFromPCM(uint8_t *_pcmData,
unsigned int _dataCount,
195 public:
void FillBufferFromFile(
const std::string &_audioFile);
199 private: std::unique_ptr<OpenALSourcePrivate> dataPtr;
Forward declarations for the common classes.
Definition: Animation.hh:26
Singleton template class.
Definition: SingletonT.hh:33
util
Definition: OpenAL.hh:37
std::shared_ptr< OpenALSource > OpenALSourcePtr
Definition: UtilTypes.hh:48
OpenAL Source.
Definition: OpenAL.hh:115
3D audio setup and playback.
Definition: OpenAL.hh:54
std::shared_ptr< OpenALSink > OpenALSinkPtr
Definition: UtilTypes.hh:44
#define GZ_SINGLETON_DECLARE(visibility, n1, n2, singletonType)
Helper to declare typed SingletonT.
Definition: SingletonT.hh:61
OpenAL Listener.
Definition: OpenAL.hh:94