fixes for Swift 6 and threading concerns
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user