18 uint8_t channel_count;
19 uint8_t bits_per_sample;
20 uint32_t samples_per_second;
24 float sample_rate_pos;
29typedef enum { KINC_A1_AUDIOFORMAT_WAV, KINC_A1_AUDIOFORMAT_OGG } kinc_a1_audioformat_t;
Audio2 is a low-level audio-API that allows you to directly provide a stream of audio-samples.
Provides basic functionality that's used all over the place. There's usually no need to manually incl...
KINC_FUNC void kinc_a1_sound_destroy(kinc_a1_sound_t *sound)
Destroy a sound.
Definition sound.c.h:222
KINC_FUNC void kinc_a1_sound_set_volume(kinc_a1_sound_t *sound, float value)
Sets the volume-multiplicator that's used when playing the sound.
Definition sound.c.h:234
KINC_FUNC float kinc_a1_sound_volume(kinc_a1_sound_t *sound)
Gets the current volume-multiplicator that's used when playing the sound.
Definition sound.c.h:230
KINC_FUNC kinc_a1_sound_t * kinc_a1_sound_create_from_buffer(uint8_t *audio_data, const uint32_t size, kinc_a1_audioformat_t format)
Create a sound from a buffer.
Definition sound.c.h:107
KINC_FUNC kinc_a1_sound_t * kinc_a1_sound_create(const char *filename)
Create a sound from a wav or ogg file.
Definition sound.c.h:191