00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef __SOUNDPROCESSOR_H__
00017 #define __SOUNDPROCESSOR_H__
00018
00019
00020 #include "../dependencies.h"
00021
00022 #ifdef __COMPILE_WITH_SFML_AUDIO__
00023
00024 #include "../core/AssetProcessor.h"
00025
00026
00027
00033 class SoundProcessor : public AssetProcessor
00034 {
00035 public:
00036
00037
00039 SoundProcessor(AssetGroup *parent);
00041 ~SoundProcessor();
00042
00043
00049 bool getSound(const std::string &fileName, c8 *& buffer, long &length);
00050
00054 bool reloadAsset(const std::string &fileName);
00056 void reloadAssets();
00057
00061 bool removeAsset(const std::string &fileName) ;
00063 void removeAssets();
00064
00067 static AssetProcessor* createProcessor(AssetGroup *parent);
00068
00069 protected:
00070
00071
00075 bool loadAsset(const std::string &fileName);
00077 void loadAssets();
00078
00079
00080 private:
00081
00082
00083 std::map<std::string, std::pair<c8*, long> > mSounds;
00084
00085 bool mIsReloading;
00086 };
00087
00088 #endif // __COMPILE_WITH_SFML_AUDIO__
00089
00090 #endif