VMUPro SDK v1.0.0
Application Development SDK for the VMUPro
|
VMUPro SDK Audio API. More...
#include <stdint.h>
#include <stdbool.h>
Go to the source code of this file.
Typedefs | |
typedef int16_t | vmupro_audio_sample_t |
Audio sample format. | |
Enumerations | |
enum | vmupro_stereo_mode_t { VMUPRO_AUDIO_MONO = 0 , VMUPRO_AUDIO_STEREO = 1 } |
Audio stereo mode enumeration. More... | |
Functions | |
bool | vmupro_audio_start_listen_mode (void) |
void | vmupro_audio_exit_listen_mode (void) |
Exit audio listen mode. | |
void | vmupro_audio_add_stream_samples (int16_t *samples, int numSamples, vmupro_stereo_mode_t stereo_mode, bool applyGlobalVolume) |
void | vmupro_audio_clear_ring_buffer (void) |
uint8_t | vmupro_get_global_volume (void) |
void | vmupro_set_global_volume (uint8_t volume) |
int | vmupro_get_ringbuffer_fill_state (uint32_t *outBufferFilledSamples, uint32_t *outBufferSizeInsamples) |
Return the fill state of the audio buffer either for internal or USB/BT audio. | |
VMUPro SDK Audio API.
This header provides audio functionality for the VMUPro device.
Definition in file vmupro_audio.h.
typedef int16_t vmupro_audio_sample_t |
Audio sample format.
Currently only 16-bit signed samples are supported.
Definition at line 30 of file vmupro_audio.h.
enum vmupro_stereo_mode_t |
Audio stereo mode enumeration.
Specifies whether audio samples are mono or stereo.
Enumerator | |
---|---|
VMUPRO_AUDIO_MONO | Mono audio (single channel) |
VMUPRO_AUDIO_STEREO | Stereo audio (dual channel) |
Definition at line 37 of file vmupro_audio.h.
void vmupro_audio_add_stream_samples | ( | int16_t * | samples, |
int | numSamples, | ||
vmupro_stereo_mode_t | stereo_mode, | ||
bool | applyGlobalVolume | ||
) |
void vmupro_audio_clear_ring_buffer | ( | void | ) |
void vmupro_audio_exit_listen_mode | ( | void | ) |
Exit audio listen mode.
Stops audio streaming mode and releases audio resources. Should be called when audio streaming is no longer needed.
bool vmupro_audio_start_listen_mode | ( | void | ) |
uint8_t vmupro_get_global_volume | ( | void | ) |
int vmupro_get_ringbuffer_fill_state | ( | uint32_t * | outBufferFilledSamples, |
uint32_t * | outBufferSizeInsamples | ||
) |
Return the fill state of the audio buffer either for internal or USB/BT audio.
outBufferFilledsamples | How many samples are sat in the ring buffer waiting to be sent to the audio device |
outBufferSizeInSamples | How big is the buffer in samples E.g. a 16kb buffer can hold 8k 16-bit mono samples or 8k 16-bit stereo samples Free space is the difference: max size - filled bytes |
void vmupro_set_global_volume | ( | uint8_t | volume | ) |