X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2Fmoof%2Fsound.hh;h=a0dd1033c1a1eb0f7979a62745537e12d8d36d08;hp=5a60f0c1ecafffb143db1e9fef53f5704adc03b4;hb=6b0a0d0efafe34d48ab344fca3b479553bd4e62c;hpb=85783316365181491a3e3c0c63659972477cebba diff --git a/src/moof/sound.hh b/src/moof/sound.hh index 5a60f0c..a0dd103 100644 --- a/src/moof/sound.hh +++ b/src/moof/sound.hh @@ -29,28 +29,22 @@ namespace moof { class sound; -typedef boost::shared_ptr sound_ptr; - +typedef resource_handle sound_handle; class sound_stream; -typedef boost::shared_ptr sound_stream_ptr; +typedef resource_handle sound_stream_handle; class sound : public resource { public: - static sound_ptr alloc(const std::string& name) - { - return sound_ptr(new sound(name)); - } - - sound(); - explicit sound(const std::string& name); + //sound(); + explicit sound(const std::string& path); virtual ~sound() {} // this implicitly stops the sound if it is playing - void sample(const std::string& name); + void sample(const std::string& path); virtual void play(); void stop(); @@ -70,8 +64,6 @@ public: static void listener_orientation(const vector3& forward, const vector3& up); - static bool find_path(std::string& name); - protected: class impl; @@ -83,16 +75,11 @@ class sound_stream : public sound { public: - static sound_stream_ptr alloc(const std::string& name) - { - return sound_stream_ptr(new sound_stream(name)); - } - - sound_stream(); - explicit sound_stream(const std::string& name) : - sound(name) {} + //sound_stream(); + explicit sound_stream(const std::string& path) : + sound(path) {} - void enqueue(const std::string& name); + void enqueue(const std::string& path); void play(); };