Module: Toybox.Audio
Overview
The Audio module provides APIs for capturing and playing audio on the device.
Modules Under Namespace
Modules: Audio.Capture, Audio.Output
Classes Under Namespace
Classes: AudioResource
Constant Summary
-
ContainerFormat
-
Codec
-
SamplingFrequency
-
ChannelMode
| 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. |
| 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. |
| 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 |
| Name | Value | Since | Description |
|---|---|---|---|
| CHANNEL_MONO | 0 | API Level 6.0.3 |
|
| CHANNEL_STEREO | 1 | API Level 6.0.3 |
Typedef Summary collapse
- AudioFormat as { :containerFormat as Audio.ContainerFormat, :codec as Audio.Codec, :frequency as Audio.SamplingFrequency, :channels as Audio.ChannelMode }