fixes for Swift 6 and threading concerns
This commit is contained in:
@@ -21,7 +21,7 @@ private final class PassthroughSynth: SynthesizerBase {
|
||||
|
||||
private final class PassthroughEffectAU: LyrebirdAudioUnit {
|
||||
public override class func makeSynthesizer() -> SynthesizerBase {
|
||||
PassthroughSynth()
|
||||
MainActor.assumeIsolated { PassthroughSynth() }
|
||||
}
|
||||
public override class var lyrebirdInputChannels: Int { 2 }
|
||||
public override class var lyrebirdOutputChannels: Int { 2 }
|
||||
@@ -37,6 +37,7 @@ private func makeEffectDescription() -> AudioComponentDescription {
|
||||
)
|
||||
}
|
||||
|
||||
@MainActor
|
||||
@Suite("LyrebirdAudioUnit effect") struct LyrebirdAudioUnitEffectTests {
|
||||
|
||||
@Test func effectAUDeclaresInputAndOutputBuses() throws {
|
||||
@@ -62,7 +63,7 @@ private func makeEffectDescription() -> AudioComponentDescription {
|
||||
override func build() { output(bus: 0, source: 0.0) }
|
||||
}
|
||||
final class StubInstrumentAU: LyrebirdAudioUnit {
|
||||
public override class func makeSynthesizer() -> SynthesizerBase { StubSynth() }
|
||||
public override class func makeSynthesizer() -> SynthesizerBase { MainActor.assumeIsolated { StubSynth() } }
|
||||
}
|
||||
let desc: AudioComponentDescription = AudioComponentDescription(
|
||||
componentType: kAudioUnitType_MusicDevice,
|
||||
|
||||
Reference in New Issue
Block a user