- struct Exception : std::runtime_error
- {
- explicit Exception(const std::string& what_arg) :
- std::runtime_error(what_arg) {}
- };
+ virtual ~Sound() {}
+
+ // this implicitly stops the sound if it is playing
+ void setSample(const std::string& name);
+
+ virtual void play();
+ void stop();
+ void pause();
+
+ void toggle();
+ bool isPlaying() const;
+
+ void setPosition(const Vector3& position);
+ void setVelocity(const Vector3& velocity);
+ void setGain(Scalar gain);
+ void setPitch(Scalar pitch);
+ void setLooping(bool looping);
+
+ static void setListenerPosition(const Vector3& position);
+ static void setListenerVelocity(const Vector3& velocity);
+ static void setListenerOrientation(const Vector3& forward,
+ const Vector3& up);
+
+ static std::string getPath(const std::string& name);