X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fsound.h;h=60bdf456319d4cf3298d74176c879aa62adb13fe;hb=17948408eafd48ea529acd0a70cc45fc5973cb10;hp=1badf3c03a9d01ff03f211daf539579278faec3b;hpb=58dc1e7c15f928d0f861a20c46f2be4112bf5baf;p=libs%2Fal.git diff --git a/source/sound.h b/source/sound.h index 1badf3c..60bdf45 100644 --- a/source/sound.h +++ b/source/sound.h @@ -1,10 +1,3 @@ -/* $Id$ - -This file is part of libmspal -Copyright © 2008 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - #ifndef MSP_AL_SOUND_H_ #define MSP_AL_SOUND_H_ @@ -15,6 +8,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 +25,16 @@ 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); +private: + void open_common(); +public: 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);