|
PebbleOS
|
#include <stdbool.h>#include <stddef.h>#include <stdint.h>Data Structures | |
| struct | BoardPowerOps |
| Optional board-level power hooks. More... | |
Macros | |
| #define | AUDIO_PLAYBACK_SAMPLE_RATE (16000) |
| PCM sample rate, in Hz, and rate of the clock seen by AudioPlaybackCB. | |
Typedefs | |
| typedef const struct AudioDevice | AudioDevice |
| Audio output device, defined by the driver implementation. | |
| typedef void(* | AudioTransCB) (uint32_t *free_size) |
| Request for more audio data. | |
| typedef void(* | AudioPlaybackCB) (const int16_t *samples, size_t count, uint32_t sample_time, void *context) |
| Observer of the mono PCM committed to DMA, including underrun silence. | |
Functions | |
| bool | audio_set_playback_callback (AudioDevice *audio_device, AudioPlaybackCB cb, void *context) |
| Register or unregister the playback observer. | |
| void | audio_init (AudioDevice *audio_device) |
| Initialize the audio device. | |
| void | audio_start (AudioDevice *audio_device, AudioTransCB cb) |
| Start playback. | |
| uint32_t | audio_write (AudioDevice *audio_device, void *writeBuf, uint32_t size) |
| Queue PCM data for playback. | |
| void | audio_set_volume (AudioDevice *audio_device, int volume) |
| Set the playback volume. | |
| void | audio_stop (AudioDevice *audio_device) |
| Stop playback. | |