1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-31 14:45:35 +00:00
openmw/libs/mangle/sound/sources/loadertemplate.hpp
2012-03-11 18:13:59 +04:00

28 lines
514 B
C++

#ifndef SSL_TEMPL_H
#define SSL_TEMPL_H
template <class SourceT, bool stream, bool file>
class SSL_Template : public SampleSourceLoader
{
public:
SSL_Template()
{
canLoadStream = stream;
canLoadFile = file;
}
SampleSourcePtr load(const std::string &filename)
{
assert(canLoadFile);
return SampleSourcePtr(new SourceT(filename));
}
SampleSourcePtr load(Stream::StreamPtr input)
{
assert(canLoadStream);
return SampleSourcePtr(new SourceT(input));
}
};
#endif