X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2Fmoof%2Fsound.hh;h=a3c94f1009bbe698bf7cd9d5fa716a8ac9d5a92c;hp=a0dd1033c1a1eb0f7979a62745537e12d8d36d08;hb=1da520638918096276158ecdfaeebc14a3d70be7;hpb=6b0a0d0efafe34d48ab344fca3b479553bd4e62c diff --git a/src/moof/sound.hh b/src/moof/sound.hh index a0dd103..a3c94f1 100644 --- a/src/moof/sound.hh +++ b/src/moof/sound.hh @@ -22,33 +22,26 @@ #include #include -#include namespace moof { -class sound; -typedef resource_handle sound_handle; -class sound_stream; -typedef resource_handle sound_stream_handle; - - -class sound : public resource +class sound { public: - //sound(); + sound(); explicit sound(const std::string& path); - virtual ~sound() {} - - // this implicitly stops the sound if it is playing void sample(const std::string& path); + void enqueue(const std::string& path); - virtual void play(); + void play(); + void stream(); void stop(); void pause(); + void rewind(); void toggle(); bool is_playing() const; @@ -58,33 +51,21 @@ public: void gain(scalar gain); void pitch(scalar pitch); void loop(bool looping); + + + void listener_position(const vector3& position); + void listener_velocity(const vector3& velocity); + void listener_orientation(const vector3& forward, + const vector3& up); - static void listener_position(const vector3& position); - static void listener_velocity(const vector3& velocity); - static void listener_orientation(const vector3& forward, - const vector3& up); -protected: +private: class impl; boost::shared_ptr impl_; }; -class sound_stream : public sound -{ -public: - - //sound_stream(); - explicit sound_stream(const std::string& path) : - sound(path) {} - - void enqueue(const std::string& path); - - void play(); -}; - - } // namespace moof #endif // _MOOF_SOUND_HH_