DEKI/ENGINE docs
manual api reference
deki-audio 0.40.1
Deki package reference
deki-audio

Audio playback peripheral interface with MAX98357 (I²S) backend

Repository: github.com/dekiengine/deki-audio · Latest release: 0.40.0 · Needs engine 0.40.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).

Components

Component Category Description
MAX98357AudioComponent Sensors Plays sound through a MAX98357A I2S amplifier.

Feature flags

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

Component reference

MAX98357AudioComponent

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.

Changelog

0.40.0

Changed

  • minEngine 0.40.0: built against engine 0.40.0. A build of this package from before does not load and is rebuilt.

0.22.0

Changed

  • Translations are keyed by the editor's names with their acronyms ("I2C Port", "SPI Host" rather than "I 2c Port", "Spi Host"), which the 0.22 editor shows.
  • minEngine 0.22.0: built against engine 0.22.0. A build of this package from before does not load and is rebuilt.

Earlier releases: CHANGELOG.md.


Generated from the package's reflection data (engine 0.40.1). Property names are the keys used in scene files. Renames keep an alias (compatibility).