fixes for Swift 6 and threading concerns

This commit is contained in:
2026-06-02 12:09:44 -07:00
parent 2fa4bfd45e
commit 6d3a0930a1
327 changed files with 1596 additions and 199 deletions
@@ -22,7 +22,7 @@ private final class TestFMSynth: SynthesizerBase {
private final class TestFMSynthAudioUnit: LyrebirdAudioUnit {
public override class func makeSynthesizer() -> SynthesizerBase {
TestFMSynth()
MainActor.assumeIsolated { TestFMSynth() }
}
public override class func parameterMetadata() -> [String: LyrebirdAUParameterInfo] {
[
@@ -44,6 +44,7 @@ private func makeDescription() -> AudioComponentDescription {
// MARK: - Init / parameter tree
@MainActor
@Suite("LyrebirdAudioUnit init") struct LyrebirdAudioUnitInitTests {
@Test func initSucceedsAndPopulatesParameterTree() throws {
@@ -94,6 +95,7 @@ private func makeDescription() -> AudioComponentDescription {
// MARK: - Resource lifecycle
@MainActor
@Suite("LyrebirdAudioUnit render resources") struct LyrebirdAudioUnitRenderResourceTests {
@Test func allocateAndDeallocateLifecycle() throws {
@@ -127,6 +129,7 @@ private func makeDescription() -> AudioComponentDescription {
}
@Test func renderProducesNonzeroOutputAfterAllocate() throws {
defer { lyrebirdClearRTMarkAfterTestRender() }
let au: TestFMSynthAudioUnit = try TestFMSynthAudioUnit(componentDescription: makeDescription())
try au.allocateRenderResources()
defer { au.deallocateRenderResources() }
@@ -175,6 +178,7 @@ private func makeDescription() -> AudioComponentDescription {
// MARK: - fullState save / restore
@MainActor
@Suite("LyrebirdAudioUnit fullState") struct LyrebirdAudioUnitFullStateTests {
@Test func fullStateRoundTripPreservesScalarLiveParams() throws {