commit current state

This commit is contained in:
2026-06-22 15:40:23 -07:00
parent e36dc3a527
commit c6f567535b
14 changed files with 431 additions and 101 deletions
+9 -3
View File
@@ -27,7 +27,9 @@ final class AppDelegate: NSObject, NSApplicationDelegate {
private static let blockSize: Int = 512
private static let sampleRate: Double = 48_000.0
private static let outputChannels: Int = 2
private static let inputChannels: Int = 6
// Built-in mics are mono; default to one input channel so live input works out of the box
// (CoreAudio can't satisfy more input channels than the device provides). Raise in the UI.
private static let inputChannels: Int = 1
private static let numAudioBuses: Int = 256
// MARK: - Window geometry constants
@@ -37,6 +39,7 @@ final class AppDelegate: NSObject, NSApplicationDelegate {
// MARK: - Owned objects
private let coreDriver: CoreAudioDriver
private let controller: ShoeGazeDemoController
private let window: LyrebirdWindow
@@ -46,15 +49,17 @@ final class AppDelegate: NSObject, NSApplicationDelegate {
// MARK: - Init
override init() {
let coreDriver: CoreAudioDriver = CoreAudioDriver()
let engine: SynthesisEngine = SynthesisEngine(
blockSize: AppDelegate.blockSize,
sampleRate: AppDelegate.sampleRate,
numOutputChannels: AppDelegate.outputChannels,
numInputChannels: AppDelegate.inputChannels,
numAudioBuses: AppDelegate.numAudioBuses,
driver: CoreAudioDriver()
driver: coreDriver
)
self.coreDriver = coreDriver
self.controller = ShoeGazeDemoController(engine: engine)
self.window = LyrebirdWindow(
title: "ShoeGaze — Lyrebird Guitar Pedalboard",
@@ -69,8 +74,9 @@ final class AppDelegate: NSObject, NSApplicationDelegate {
func applicationDidFinishLaunching(_ notification: Notification) {
installMainMenu()
let demoController: ShoeGazeDemoController = controller
let driver: CoreAudioDriver = coreDriver
window.open {
DemoRootView(controller: demoController)
DemoRootView(controller: demoController, hardwareSampleRate: { driver.deviceSampleRate })
}
}