You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
908B

  1. #pragma once
  2. #include <common.hpp>
  3. namespace rack {
  4. namespace plugin {
  5. struct Plugin;
  6. } // namespace plugin
  7. namespace engine {
  8. struct Module;
  9. } // namespace engine
  10. namespace asset {
  11. void init();
  12. /** Returns the path of a system asset. Read-only files. */
  13. std::string system(std::string filename = "");
  14. /** Returns the path of a user asset. Readable/writable files. */
  15. std::string user(std::string filename = "");
  16. /** Returns the path of an asset in the plugin's dir. Read-only files.
  17. Examples:
  18. asset::plugin(pluginInstance, "samples/00.wav") // "/<Rack user dir>/plugins/MyPlugin/samples/00.wav"
  19. */
  20. std::string plugin(plugin::Plugin* plugin, std::string filename = "");
  21. // Set these before calling init() to override the default paths
  22. extern std::string systemDir;
  23. extern std::string userDir;
  24. // Only defined on Mac
  25. extern std::string bundlePath;
  26. } // namespace asset
  27. } // namespace rack