34 lines
1.0 KiB
Swift
34 lines
1.0 KiB
Swift
// ShoeGazeiOSDemoApp.swift
|
|
// Lyrebird
|
|
//
|
|
// Copyright (c) 2026 Joshua Parmenter / realizedsound
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
import SwiftUI
|
|
import LyrebirdShoeGazeUI
|
|
|
|
/// iOS entry point for the ShoeGaze in-repo demo.
|
|
///
|
|
/// Holds the `ShoeGazeiOSDemoAppModel` as `@State` so it is created once and
|
|
/// owned for the lifetime of the app. The audio engine is **not** started
|
|
/// automatically — the user presses Start in the pedalboard (`ShoeGazeView`) to
|
|
/// begin audio. The engine is stopped when the view disappears.
|
|
@main
|
|
struct ShoeGazeiOSDemoApp: App {
|
|
|
|
@State private var model: ShoeGazeiOSDemoAppModel = ShoeGazeiOSDemoAppModel()
|
|
|
|
var body: some Scene {
|
|
WindowGroup {
|
|
NavigationStack {
|
|
ScrollView {
|
|
ShoeGazeView(shoeGaze: model.shoeGaze, hardwareSampleRate: { model.hardwareSampleRate })
|
|
.padding(.horizontal, 12)
|
|
}
|
|
.navigationTitle("ShoeGaze")
|
|
}
|
|
.onDisappear { model.stop() }
|
|
}
|
|
}
|
|
}
|