X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FMoof%2FSound.hh;fp=src%2FMoof%2FSound.hh;h=0000000000000000000000000000000000000000;hp=bbfef127434d19b3884399f6b63a43176bec497e;hb=831f04d4bc19a390415ac0bbac4331c7a65509bc;hpb=299af4f2047e767e5d79501c26444473bda64c64 diff --git a/src/Moof/Sound.hh b/src/Moof/Sound.hh deleted file mode 100644 index bbfef12..0000000 --- a/src/Moof/Sound.hh +++ /dev/null @@ -1,104 +0,0 @@ - -/*] Copyright (c) 2009-2010, Charles McGarvey [************************** -**] All rights reserved. -* -* vi:ts=4 sw=4 tw=75 -* -* Distributable under the terms and conditions of the 2-clause BSD license; -* see the file COPYING for a complete text of the license. -* -**************************************************************************/ - -#ifndef _MOOF_SOUND_HH_ -#define _MOOF_SOUND_HH_ - -/** - * @file Sound.hh - * Load and play sounds, current supports ogg vorbis. - */ - -#include - -#include - -#include -#include - - -namespace Mf { - - -class Sound; -typedef boost::shared_ptr SoundP; - -class SoundStream; -typedef boost::shared_ptr SoundStreamP; - - -class Sound : public Resource -{ -public: - - static SoundP alloc(const std::string& name) - { - return SoundP(new Sound(name)); - } - - Sound(); - explicit Sound(const std::string& name); - - 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 bool getPath(std::string& name); - -protected: - - class Impl; - boost::shared_ptr mImpl; -}; - - -class SoundStream : public Sound -{ -public: - - static SoundStreamP alloc(const std::string& name) - { - return SoundStreamP(new SoundStream(name)); - } - - SoundStream(); - explicit SoundStream(const std::string& name) : - Sound(name) {} - - void enqueue(const std::string& name); - - void play(); -}; - - -} // namespace Mf - -#endif // _MOOF_SOUND_HH_ -