Module: Toybox.Audio

Overview

The Audio module provides APIs for capturing and playing audio on the device.

Since:

API Level 6.0.3

App Types and Runtime Contexts:

  • Audio Content Provider

  • Glance

  • Watch App

Supported Devices:

Modules Under Namespace

Modules: Audio.Capture, Audio.Output

Classes Under Namespace

Classes: AudioResource

Constant Summary

ContainerFormat

Since:

API Level 6.0.3

Name Value Since Description
CONTAINER_WAV 0

API Level 6.0.3

WAV container format.

CONTAINER_OGG 1

API Level 6.0.3

OGG container format.

Codec

Since:

API Level 6.0.3

Name Value Since Description
CODEC_LPCM 0

API Level 6.0.3

LPCM encoding format. Audio captured with this encoding uses 16-bit samples.

CODEC_OPUS 1

API Level 6.0.3

OPUS encoding format.

SamplingFrequency

Since:

API Level 6.0.3

Name Value Since Description
FREQ_8_KHZ 0

API Level 6.0.3

FREQ_11_025_KHZ 1

API Level 6.0.3

FREQ_12_KHZ 2

API Level 6.0.3

FREQ_16_KHZ 3

API Level 6.0.3

FREQ_22_05_KHZ 4

API Level 6.0.3

FREQ_24_KHZ 5

API Level 6.0.3

FREQ_32_KHZ 6

API Level 6.0.3

FREQ_44_1_KHZ 7

API Level 6.0.3

ChannelMode

Since:

API Level 6.0.3

Name Value Since Description
CHANNEL_MONO 0

API Level 6.0.3

CHANNEL_STEREO 1

API Level 6.0.3

Typedef Summary collapse

Typedef Details

AudioFormat as { :containerFormat as Audio.ContainerFormat, :codec as Audio.Codec, :frequency as Audio.SamplingFrequency, :channels as Audio.ChannelMode }

Since:

API Level 6.0.3


Generated Oct 19, 2026, 4:16:38 PM