]> Dogcows Code - chaz/yoink/blobdiff - src/moof/sound.cc
converted image management to resource handles
[chaz/yoink] / src / moof / sound.cc
index 853c21a3d806f92bbb48fb91cb188b6d70e5c678..a6fbf0310679faacc76175aa9d67b71079b1e9e5 100644 (file)
@@ -17,6 +17,7 @@
 
 #include <boost/algorithm/string.hpp>
 #include <boost/cstdint.hpp>
+#include <boost/noncopyable.hpp>
 #include <AL/al.h>
 #include <AL/alc.h>
 #include <vorbis/codec.h>
@@ -233,7 +234,7 @@ buffer::retcount_lookup buffer::retain_counts_;
 
 // SOUND RESOURCE
 
-class sound_resource
+class sound_resource : public boost::noncopyable
 {
 public:
 
@@ -252,7 +253,7 @@ public:
        }
 
 
-       bool read(buffer& buf)
+       bool read(buffer& buf) const
        {
                if (buffer_)
                {
@@ -305,7 +306,7 @@ public:
        }
 
 
-       bool read(buffer& buf, uint64_t& sample)
+       bool read(buffer& buf, uint64_t& sample) const
        {
                if (ov_pcm_seek_lap(&file_, sample) != 0)
                {
@@ -344,8 +345,8 @@ public:
 
 private:
 
-       OggVorbis_File  file_;
-       buffer                  buffer_;
+       mutable OggVorbis_File  file_;
+       mutable buffer                  buffer_;
 };
 
 
This page took 0.020767 seconds and 4 git commands to generate.