v2.3.3 release: cross-platform driver in docs (makeDefaultAudioDriver)
This commit is contained in:
@@ -43,13 +43,13 @@ A Lyrebird program is a normal Swift program that uses the Lyrebird library. Her
|
||||
import Foundation
|
||||
import LyrebirdSynth
|
||||
|
||||
// The engine owns Core Audio and runs the audio graph.
|
||||
// The engine owns the audio device and runs the audio graph.
|
||||
let engine: SynthesisEngine = SynthesisEngine(
|
||||
blockSize: 512,
|
||||
sampleRate: 48000,
|
||||
numOutputChannels: 2,
|
||||
numInputChannels: 0,
|
||||
driver: CoreAudioDriver()
|
||||
driver: makeDefaultAudioDriver()
|
||||
)
|
||||
|
||||
// A synthesizer describes the sound.
|
||||
@@ -98,7 +98,7 @@ let engine: SynthesisEngine = SynthesisEngine(
|
||||
sampleRate: 48000,
|
||||
numOutputChannels: 2,
|
||||
numInputChannels: 0,
|
||||
driver: CoreAudioDriver()
|
||||
driver: makeDefaultAudioDriver()
|
||||
)
|
||||
```
|
||||
|
||||
@@ -108,7 +108,7 @@ let engine: SynthesisEngine = SynthesisEngine(
|
||||
- `blockSize: 512` — the engine processes audio 512 samples at a time. (Lyrebird caps this at 512.)
|
||||
- `sampleRate: 48000` — 48,000 samples per second.
|
||||
- `numOutputChannels: 2` — stereo out. `numInputChannels: 0` — no microphone input.
|
||||
- `driver: CoreAudioDriver()` — talk to the Mac's audio hardware. (iOS uses a different driver; guide 4.)
|
||||
- `driver: makeDefaultAudioDriver()` — connect to the platform's audio hardware. It picks the backend automatically: Core Audio on macOS, the iOS driver on iOS, ALSA on Linux (and a silent offline driver where no live audio exists), so the same line works everywhere. (guide 4.)
|
||||
|
||||
### Describing the sound
|
||||
|
||||
|
||||
Reference in New Issue
Block a user