1#ifndef KORE_MIXER_SOUND_HEADER
2#define KORE_MIXER_SOUND_HEADER
19 uint8_t channel_count;
20 uint8_t bits_per_sample;
21 uint32_t samples_per_second;
25 float sample_rate_pos;
30typedef enum { KORE_MIXER_AUDIOFORMAT_WAV, KORE_MIXER_AUDIOFORMAT_OGG } kore_mixer_audioformat;
This 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...
KORE_FUNC kore_mixer_sound * kore_mixer_sound_create_from_file_buffer(uint8_t *audio_data, uint32_t size, kore_mixer_audioformat format)
Create a sound from the contents of a wav or ogg file.
KORE_FUNC void kore_mixer_sound_destroy(kore_mixer_sound *sound)
Destroy a sound.
KORE_FUNC kore_mixer_sound * kore_mixer_sound_create_from_file(const char *filename)
Create a sound from a wav or ogg file.
KORE_FUNC float kore_mixer_sound_volume(kore_mixer_sound *sound)
Gets the current volume-multiplicator that's used when playing the sound.
KORE_FUNC kore_mixer_sound * kore_mixer_sound_create_from_samples(int16_t *samples, uint32_t samples_count, uint32_t samples_per_second, bool stereo)
Create a sound from an array of samples.
KORE_FUNC void kore_mixer_sound_set_volume(kore_mixer_sound *sound, float value)
Sets the volume-multiplicator that's used when playing the sound.