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=3f64162f0ca4b2a690f3b7be7005095ee00a3f7c;hp=bc669bcd5df6dcf629ab26a97b564b23e6151b3a;hb=fdfba4553433b9b2804c2772c7645211b828c2ea;hpb=5fa5f117f28922a7e539a432367960c1a61f837d diff --git a/src/Moof/Sound.hh b/src/Moof/Sound.hh index bc669bc..3f64162 100644 --- a/src/Moof/Sound.hh +++ b/src/Moof/Sound.hh @@ -46,9 +46,24 @@ namespace Mf { +class Sound; +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) + { + return SoundP(new Sound(name)); + } + Sound(const std::string& name); void play(); @@ -59,6 +74,7 @@ public: static std::string getPath(const std::string& name); + struct Exception : public Mf::Exception { enum @@ -84,11 +100,6 @@ public: return Mf::Exception::what(); } }; - -protected: - Sound() {} - class Impl; - boost::shared_ptr impl_; };