Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
au_factory_presets.hpp File Reference

The factory-preset surface both Audio Unit adapters serve to the host. More...

#include <AudioToolbox/AudioToolbox.h>
#include <CoreFoundation/CoreFoundation.h>
#include <pulp/state/preset_manager.hpp>
#include <pulp/state/store.hpp>
#include <cstddef>
#include <filesystem>
#include <memory>
#include <string>
#include <vector>

Go to the source code of this file.

Classes

class  pulp::format::au::FactoryPresetTable
 The host-facing factory-preset table for one plug-in instance. More...

Namespaces

namespace  pulp
namespace  pulp::format
 What the product grants a device: the quota table indexed by capability tier and live thermal state.
namespace  pulp::format::au
 Apple-only: the whole header is gated on APPLE so it stays an empty no-op on the Linux header-hygiene check.

Functions

std::filesystem::path pulp::format::au::factory_presets_dir_for_binary (const std::filesystem::path &binary)
 Map a plug-in binary's path to the folder holding its factory presets.
std::filesystem::path pulp::format::au::loaded_bundle_factory_presets_dir ()
 factory_presets_dir_for_binary applied to the image this code is linked into.

Detailed Description

The factory-preset surface both Audio Unit adapters serve to the host.

pulp::state::PresetManager already models factory-versus-user presets, but it cannot find a bundled plug-in's factory folder by itself — that path is format- and platform-specific. This header owns the Apple half: resolve the folder from the loaded binary, scan it once, and hand the host a stable, index-addressable table.

Both AU generations address a factory preset by number, so the index a host stores in a session must mean the same preset when that session reopens. The table is therefore built once per instance and sorted by name (the order PresetManager::factory_presets() returns), never reordered by use.