]> git.tdb.fi Git - libs/al.git/blobdiff - source/sound.h
Bump version for release
[libs/al.git] / source / sound.h
index 1badf3c03a9d01ff03f211daf539579278faec3b..1bc043bfe5c127a89d9ab636d3a4ac5c72ff4ec6 100644 (file)
@@ -15,6 +15,10 @@ Distributed under the LGPL
 namespace Msp {
 namespace AL {
 
+/**
+This class facilitates loading sound files.  Currently only Ogg Vorbis is
+supported.
+*/
 class Sound
 {
 private:
@@ -28,12 +32,13 @@ private:
 
 public:
        Sound();
-       Sound(const std::string &);
        ~Sound();
 
-       void open(const std::string &);
+       void open_file(const std::string &);
+       void open_memory(const void *, unsigned);
        void load_data();
-       void load(const std::string &);
+       void load_file(const std::string &);
+       void load_memory(const void *, unsigned);
        void close();
        void rewind();
        unsigned read(char *, unsigned);
@@ -43,6 +48,8 @@ public:
        unsigned get_frequency() const { return freq; }
        unsigned get_size() const { return size; }
        const char *get_data() const;
+private:
+       void open_common();
 };
 
 } // namespace AL