00001
00024 #ifndef SAMPLE_H_INCLUDED_C4211F97
00025 #define SAMPLE_H_INCLUDED_C4211F97
00026
00027 #include "openalpp/windowsstuff.h"
00028 #include "openalpp/sounddata.h"
00029 #include "openalpp/error.h"
00030 #include <string>
00031
00032 namespace openalpp {
00033
00037 class OPENALPP_API Sample : public SoundData {
00038 public:
00043 Sample(const std::string& filename ) throw (FileError);
00044
00048 Sample(const Sample &sample);
00049
00057 Sample(ALenum format,ALvoid* data,ALsizei size,ALsizei freq) throw (FileError);
00058
00059
00064 std::string getFileName() const;
00065
00069 Sample &operator=(const Sample &sample);
00070
00071 protected:
00075 virtual ~Sample();
00076
00077 private:
00081 std::string filename_;
00082
00083 };
00084
00088 unsigned int sampleSize(SampleFormat format);
00089 unsigned int sampleSize(ALenum format);
00090 }
00091
00092 #endif