v2.3.3 release: cross-platform driver in docs (makeDefaultAudioDriver)

This commit is contained in:
2026-12-01 21:32:39 -08:00
parent 56726223f6
commit a175c437de
23 changed files with 54 additions and 43 deletions
+3 -3
View File
@@ -112,7 +112,7 @@ let engine = SynthesisEngine(
sampleRate: 48_000,
numOutputChannels: 2,
numInputChannels: 0,
driver: CoreAudioDriver()) // NRTDriver for offline, iOSAudioDriver for iOS
driver: makeDefaultAudioDriver()) // CoreAudio on macOS, iOS driver on iOS, ALSA on Linux; NRTDriver for offline
try engine.start()
try engine.add(FMTone()) // sounds immediately
@@ -121,7 +121,7 @@ try engine.schedule(tone, after: 2.5) // sample-accurate, 2.5 s from now
tone.carrierFreq = 660 // live, atomic, no glitch
```
Swap `CoreAudioDriver()` for `NRTDriver(outputURL:duration:)` and the identical graph renders offline to a CAF file. See [`INSTALLATION_AND_USAGE.md`](INSTALLATION_AND_USAGE.md) to add the package and scaffold projects, and [`ARCHITECTURE.md`](ARCHITECTURE.md) for how the threading and scheduling work underneath.
Swap `makeDefaultAudioDriver()` for `NRTDriver(outputURL:duration:)` and the identical graph renders offline to a CAF file. See [`INSTALLATION_AND_USAGE.md`](INSTALLATION_AND_USAGE.md) to add the package and scaffold projects, and [`ARCHITECTURE.md`](ARCHITECTURE.md) for how the threading and scheduling work underneath.
### Live coding — prototype in the interpreter
@@ -136,7 +136,7 @@ import LyrebirdSynth
let engine = SynthesisEngine(
blockSize: 512, sampleRate: 48_000,
numOutputChannels: 2, numInputChannels: 0,
driver: CoreAudioDriver())
driver: makeDefaultAudioDriver())
try engine.start()
// Define a synth right in the session.