3 New external module interface
Avery King edited this page 2023-06-23 20:14:06 +00:00

Although Audacity has its own module interface, I'm looking to propose a new, documented module interface. Undertaking this effort will not be easily, but hopefully the planning will be there along the way.

- Avery (@generic-pers0n)

Tenacity Modules

Internals

  • Modify ModuleManager to use the new module interface. Maybe preserve the old interface.

Required Symbols

  • ModuleInf GetModuleInfo() - Retrieves info about the module, including its name, module version (optional), and required app version.
  • void Module_Init() - Loads the module. Would be called by ModuleManager when loading a module.
  • void Module_Destroy() - Destroys the module. Would be called by ModuleManager when unloading a module.
  • ModuleStatus Module_Dispatch() - Handles certain actions (TODO: define which actions it handles). This function returns a ModuleStatus value, which can be one of the following:
    • ModuleStatus::OK - Everything succeeded while handling the dispatch.
    • ModuleStatus::Error - An error occurred while handling the dispatch.
    • ModuleStatus::FatalError - A fatal error occurred while handling the dispatch.
    • ModuleStatus::Reload - Handling the dispatch succeeded, but the module should be reloaded.