1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-04-11 00:44:33 +00:00
OpenMW/sound/sources/loadertemplate.h
2009-12-29 11:56:14 +01:00

27 lines
456 B
C++

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