12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- #pragma once
- #include "openmpt/all/BuildSettings.hpp"
- #include <iosfwd>
- #include "../common/FileReaderFwd.h"
- OPENMPT_NAMESPACE_BEGIN
- class IMixPlugin;
- class VSTPresets
- {
- public:
- enum ErrorCode
- {
- noError,
- invalidFile,
- wrongPlugin,
- wrongParameters,
- outOfMemory,
- };
- #ifndef NO_PLUGINS
- static ErrorCode LoadFile(FileReader &file, IMixPlugin &plugin);
- static bool SaveFile(std::ostream &, IMixPlugin &plugin, bool bank);
- static const char *GetErrorMessage(ErrorCode code);
- protected:
- static void SaveProgram(std::ostream &f, IMixPlugin &plugin);
- #else
- static ErrorCode LoadFile(FileReader &, IMixPlugin &) { return invalidFile; }
- static bool SaveFile(std::ostream &, IMixPlugin &, bool) { return false; }
- static const char *GetErrorMessage(ErrorCode) { return "OpenMPT has been built without plugin support"; }
- #endif
- };
- OPENMPT_NAMESPACE_END
|