PORTING.md: native SwiftUI app on a C++ engine verified against Kotlin. IosGoldenInstruments renders note scripts through the Kotlin voices; the C++ runner plays the same scripts through TestVoice makers (weak placeholders until each port lands). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
29 lines
992 B
C++
29 lines
992 B
C++
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
// Weak placeholders for the TestVoice makers (see TestVoice.hpp): a port's strong
|
|
// definition replaces its placeholder at link time.
|
|
|
|
#include <cstring>
|
|
#include "sizzle/TestVoice.hpp"
|
|
|
|
#define SIZZLE_TEST_MAKER(fn) \
|
|
__attribute__((weak)) std::unique_ptr<TestVoice> fn(const TestVoiceSetup &) { return nullptr; }
|
|
|
|
namespace sizzle {
|
|
|
|
SIZZLE_TEST_MAKER(makeSynthTestVoice)
|
|
SIZZLE_TEST_MAKER(makeFrasilTestVoice)
|
|
SIZZLE_TEST_MAKER(makeWaveTestVoice)
|
|
SIZZLE_TEST_MAKER(makeGrainTestVoice)
|
|
|
|
std::unique_ptr<TestVoice> makeTestVoice(const char *kind, const TestVoiceSetup &s) {
|
|
if (!std::strcmp(kind, "SYNTH")) return makeSynthTestVoice(s);
|
|
if (!std::strcmp(kind, "FRASIL")) return makeFrasilTestVoice(s);
|
|
if (!std::strcmp(kind, "WAVE")) return makeWaveTestVoice(s);
|
|
if (!std::strcmp(kind, "GRAIN")) return makeGrainTestVoice(s);
|
|
return nullptr;
|
|
}
|
|
|
|
} // namespace sizzle
|