|
deki-audio 0.19.0
Deki package reference
|
Audio playback peripheral interface with MAX98357 (I²S) backend
Repository: github.com/dekiengine/deki-audio · Latest release: 0.19.0 · Needs engine 0.19.0+ · Requires: deki-i2s
Install with DekiEditor --packages-add deki-audio <project>, or from the Package Manager. The engine's own components and C++ API are in the Deki docs.
Shown in the editor as Audio (Speaker / PCM playback).
| Component | Category | Description |
|---|---|---|
| MAX98357AudioComponent | Sensors | Plays sound through a MAX98357A I2S amplifier. |
Parts you can leave out of a build. A feature with a define is switched there; the rest are stripped with their components.
| Feature | Define | Default |
|---|---|---|
| MAX98357A (I²S class-D mono amp, 16-bit PCM) | DEKI_FEATURE_AUDIO_MAX98357 | on |
Plays sound through a MAX98357A I2S amplifier.
Inspector name: MAX98357A Audio · Category: Sensors · Type: DekiAudio::MAX98357AudioComponent
| Property | Type | Default | Constraints | Description |
|---|---|---|---|---|
| i2sPort | int32 | 0 | 0 to 1 | Which of the chip's I2S controllers drives the amplifier. Most boards only use one. |
| bclkPin | int32 | 39 | 0 to 48 | GPIO carrying the bit clock (BCLK), which ticks once per audio bit. |
| lrclkPin | int32 | 40 | 0 to 48 | GPIO carrying the word select line (LRCLK or WS), which marks left and right samples. Some boards label it LRC. |
| dinPin | int32 | 5 | 0 to 48 | GPIO carrying the audio data into the amplifier (DIN). This is the one sound actually travels on. |
| sampleRate | int32 | 16000 | 8000 to 48000 | Samples per second. 16 kHz is plenty for speech and effects and cheap on memory; 44100 is CD rate and costs nearly three times the bandwidth. |
| channels | int32 | 1 | 1 to 2 | 1 for mono, 2 for stereo. The MAX98357 is a mono amplifier, so stereo material is mixed down unless a second one is wired for the other channel. |
| initialVolume | int32 | 80 | 0 to 100 | Volume at startup, 0 to 100. Applies before the first sound plays, so a project can come up quiet rather than at full output. |
Earlier releases: CHANGELOG.md.
Generated from the package's reflection data (engine 0.19.0). Property names are the keys used in scene files. Renames keep an alias (compatibility).