diff --git a/devtools/Importer.cpp b/devtools/Importer.cpp index 2b2f8b75..44d5bb35 100644 --- a/devtools/Importer.cpp +++ b/devtools/Importer.cpp @@ -3,14 +3,18 @@ int main(int argc, char* argv[]) { + const sfz::InstrumentFormatRegistry& formatRegistry = sfz::InstrumentFormatRegistry::getInstance(); + if (argc != 2) { std::cerr << "Usage: sfizz_importer \n"; + std::cerr << "--\n" "Supported formats:\n"; + for (const sfz::InstrumentFormat* format : formatRegistry.getAllFormats()) + std::cerr << " * " << format->name() << '\n'; return 1; } const fs::path foreignPath = fs::u8path(argv[1]); - const sfz::InstrumentFormatRegistry& formatRegistry = sfz::InstrumentFormatRegistry::getInstance(); const sfz::InstrumentFormat* format = formatRegistry.getMatchingFormat(foreignPath); if (!format) { diff --git a/src/sfizz/import/ForeignInstrument.h b/src/sfizz/import/ForeignInstrument.h index 94baacf8..cba75b66 100644 --- a/src/sfizz/import/ForeignInstrument.h +++ b/src/sfizz/import/ForeignInstrument.h @@ -34,6 +34,11 @@ public: */ const InstrumentFormat* getMatchingFormat(const fs::path& path) const; + /** + * @brief Get the list of registered formats. + */ + const std::vector& getAllFormats() const noexcept { return formats_; } + private: std::vector formats_; };