Files
OSGKeyboard/OSGKeyboardShared/Models/AudioBufferSnapshot.swift
T
Rocky 31f5937a7f feat(keyboard): improve typing, voice flow, and polish reliability
Reduce extension memory pressure and delivery races while adding richer candidates, tactile feedback, and safer two-level creative polishing.
2026-08-05 21:39:31 +08:00

19 lines
537 B
Swift

// AudioBufferSnapshot.swift
// OSGKeyboard · Shared
//
// Sendable wrapper around a Float32 audio buffer's raw samples.
// Lives in Shared (no AVFoundation) so utterance chunking stays extension-safe.
// The AVAudioPCMBuffer initializer lives in OSGKeyboardHostSupport.
import Foundation
public struct AudioBufferSnapshot: Sendable {
public let samples: [Float]
public let sampleRate: Double
public init(samples: [Float], sampleRate: Double) {
self.samples = samples
self.sampleRate = sampleRate
}
}