bugfixes, better MusicXML support and 1.1.0
This commit is contained in:
@@ -26,6 +26,7 @@ final class AppDelegate: NSObject, NSApplicationDelegate {
|
||||
let binDelayController: BinDelayController
|
||||
var window: LyrebirdWindow?
|
||||
|
||||
@MainActor
|
||||
init(engine: SynthesisEngine) {
|
||||
let scopeCapture = ScopeCapture(buses: [0, 1], bufferSize: 2048)
|
||||
engine.scopeTap = scopeCapture
|
||||
|
||||
@@ -13,6 +13,7 @@ import LyrebirdSynth
|
||||
/// first taps "Start Synthesizer" — this is necessary because
|
||||
/// `SpectralBinDelayUI.init(sampleRate:)` requires the engine's committed
|
||||
/// sample rate, which is only valid after `engine.start()` returns.
|
||||
@MainActor
|
||||
@Observable
|
||||
final class BinDelayController {
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
import Observation
|
||||
import LyrebirdSynth
|
||||
|
||||
@MainActor
|
||||
@Observable
|
||||
final class NoteController {
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
import Observation
|
||||
import LyrebirdSynth
|
||||
|
||||
@MainActor
|
||||
@Observable
|
||||
final class VectorOscillatorController {
|
||||
|
||||
|
||||
@@ -15,8 +15,13 @@ let engine = SynthesisEngine(
|
||||
driver: CoreAudioDriver()
|
||||
)
|
||||
|
||||
let delegate = AppDelegate(engine: engine)
|
||||
let app = NSApplication.shared
|
||||
app.setActivationPolicy(.regular)
|
||||
app.delegate = delegate
|
||||
app.run()
|
||||
// AppDelegate.init is @MainActor (it builds @MainActor SynthesizerBase synths
|
||||
// and UI controllers). Program entry runs on the main thread, so assert main-
|
||||
// actor isolation for the AppKit bootstrap rather than hopping asynchronously.
|
||||
MainActor.assumeIsolated {
|
||||
let delegate: AppDelegate = AppDelegate(engine: engine)
|
||||
let app: NSApplication = NSApplication.shared
|
||||
app.setActivationPolicy(.regular)
|
||||
app.delegate = delegate
|
||||
app.run()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user