Skip to main content

Module plugin

Module plugin 

Source
Expand description

The renderer that plays a job through a real plug-in.

The plug-in runs in a child process, sound-to-patch-host, so a crash or a hang of the plug-in never takes this process down, and the host can run as another architecture. The two talk the super::wire protocol.

The host picks its architecture from the plug-in bundle: a bundle with a slice for this process’s architecture loads directly; a bundle with only an x86_64 slice loads in an x86_64 host under Rosetta on Apple silicon. Rendering through a plug-in runs on macOS only.

Structs§

PluginRenderer
Plays jobs through one plug-in instance in a host process.

Enums§

Arch
A CPU architecture of a Mach-O binary.
Launch
How to start the host for a plug-in: directly, or under arch as another architecture.

Constants§

HOST_ENV
The environment variable that names the host binary.
HOST_NAME
The file name of the host binary.

Functions§

bundle_executable
The executable inside a plug-in bundle: Contents/MacOS/<name>.
find_plugin
The standard VST3 bundle of synth: the system folder first, then the user’s.
host_binary
The host binary: the path in HOST_ENV, else the file next to this program.
mach_o_archs
Reads the architectures of a Mach-O binary from its header: a thin binary has one, a universal binary lists each slice. Unknown CPU types are left out; a file that is no Mach-O binary gives none.
pick_launch
Picks how to start the host. rosetta says whether this machine can run x86_64 code on Apple silicon.