1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-24 03:23:54 +00:00
openmw/sound/sources/loadertemplate.h
2009-12-29 11:56:14 +01:00

26 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