C++ ports of the Kotlin effects, checked against audio the Kotlin code renders (25 scenarios, IosGoldenExport); an Objective-C++ AUv3 wrapper checked on the Mac against the core (parameters, presets, saved state); a container app that checks each plugin on the device. Built as a TrollStore .ipa. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
28 lines
935 B
C++
28 lines
935 B
C++
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
#pragma once
|
|
|
|
#include <memory>
|
|
#include "sizzle/Params.hpp"
|
|
|
|
namespace sizzle {
|
|
|
|
/**
|
|
* An insert effect: the C++ twin of AudioEffect in Effects.kt. `update` refreshes
|
|
* cached settings (call it when the params change, and once before processing);
|
|
* `process` runs per mono sample and must never allocate or lock. Construct on a
|
|
* normal thread: constructors allocate delay lines for [sampleRate].
|
|
*/
|
|
class Effect {
|
|
public:
|
|
virtual ~Effect() = default;
|
|
virtual void update(const Params &p, float tempoBpm) = 0;
|
|
virtual float process(float x) = 0;
|
|
|
|
/** The effect for ToolboxType name [type] ("DELAY", "FILTER", …), or nullptr
|
|
* for types without an audio processor (the MIDI effects) or not ported yet. */
|
|
static std::unique_ptr<Effect> create(const char *type, int sampleRate);
|
|
};
|
|
|
|
} // namespace sizzle
|