X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FMoof%2FSound.hh;h=32f4c87097fed36cf82c651c0a32dad75ad2082d;hp=3f64162f0ca4b2a690f3b7be7005095ee00a3f7c;hb=57b78ebe21b1b48acd337daa5a1cb8c383959cfa;hpb=58cedf00e6ebf6282938c019b8eb105e3fb05eaa diff --git a/src/Moof/Sound.hh b/src/Moof/Sound.hh index 3f64162..32f4c87 100644 --- a/src/Moof/Sound.hh +++ b/src/Moof/Sound.hh @@ -34,8 +34,6 @@ * Image-loading and OpenGL texture loading. */ -#include - #include #include @@ -52,25 +50,39 @@ typedef boost::shared_ptr SoundP; class Sound : public Resource { -protected: - Sound() {} class Impl; boost::shared_ptr impl_; public: - static SoundP alloc(const std::string& name) + inline static SoundP alloc(const std::string& name) { return SoundP(new Sound(name)); } - Sound(const std::string& name); + explicit Sound(const std::string& name); + void play(); + + void stream(); + void update(Scalar t, Scalar dt); + + void stop(); void pause(); - void togglePlayPause(); + void resume(); + void toggle(); + + void setSample(const std::string& name); + void enqueue(const std::string& name); + bool isPlaying() const; + + void setPosition(Vector3 position); + void setVelocity(Vector3 velocity); void setGain(Scalar gain); + void setPitch(Scalar pitch); + void setLooping(bool looping); static std::string getPath(const std::string& name); @@ -103,17 +115,6 @@ public: }; -class SoundStream : public Sound -{ -public: - SoundStream(const std::string& name); - - void update(Scalar t, Scalar dt); - - static std::string getPath(const std::string& name); -}; - - } // namespace Mf #endif // _MOOF_SOUND_HH_