v1.4.0 release: live-coding scratch editor, interpreted Graph DSL, ClosureSynthesizer + SampleLoop

This commit is contained in:
2026-07-20 10:02:49 -07:00
parent 560724d116
commit 38d2107f64
104 changed files with 14471 additions and 105 deletions
+18
View File
@@ -664,4 +664,22 @@ struct DiskInOutTests {
diskOut.close() // second call must not crash or deadlock
#expect(FileManager.default.fileExists(atPath: outURL.path))
}
/// A `DiskOut.Audio` whose output path is unwritable must throw from `init`
/// rather than construct a half-built recorder. This throw happens before
/// `super.init()`, so the ring storage is freed by an explicit
/// `deallocate()` on the throw path (Swift does not run `deinit` for an
/// initializer that throws before `super.init()`).
@Test func diskOutInvalidURLThrows() {
// A path under a directory that does not exist — ExtAudioFileCreateWithURL fails.
let badURL: URL = URL(fileURLWithPath: "/nonexistent-dir-\(UUID().uuidString)/out.wav")
#expect(throws: DiskOutError.self) {
_ = try DiskOut.Audio(source: 0.0 as Double,
channelCount: 2,
url: badURL,
sampleRate: 44100,
format: .wav,
bufferFrames: 8192)
}
}
}