openmw-tes3coop/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