/*! * @file resource_sound_buffer.h * @brief Contains the ResourceSoundBuffer class, that handles the Resource-specific loading part of the SoundBuffer. * */ #ifndef _RESOURCE_SOUND_BUFFER_H #define _RESOURCE_SOUND_BUFFER_H #include "util/loading/resource.h" #include "sound_buffer.h" namespace OrxSound { class ResourceSoundBuffer : public SoundBuffer, public Resources::NewResource { ObjectListDeclaration(ResourceSoundBuffer); public: ResourceSoundBuffer(const std::string& soundName); static ResourceSoundBuffer createFromString(const std::string& loadString) { return ResourceSoundBuffer(loadString); }; private: class SoundBufferResourcePointer : public Resources::StorePointer { public: SoundBufferResourcePointer(const std::string& loadString, const Resources::KeepLevel& keepLevel, const SoundBufferData::Pointer& data); inline const SoundBufferData::Pointer& ptr() const { return pointer; } private: SoundBufferData::Pointer pointer; }; private: static Resources::tType type; }; } #endif /* _RESOURCE_SOUND_BUFFER_H */