|
Kore 3
|
Sounds are pre-decoded on load and therefore primarily useful for playing sound-effects. More...
Go to the source code of this file.
Data Structures | |
| struct | kore_mixer_sound |
Typedefs | |
| typedef struct kore_mixer_sound | kore_mixer_sound |
Enumerations | |
| enum | kore_mixer_audioformat { KORE_MIXER_AUDIOFORMAT_WAV , KORE_MIXER_AUDIOFORMAT_OGG } |
Functions | |
| 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 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 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_destroy (kore_mixer_sound *sound) |
| Destroy a sound. | |
| 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 void | kore_mixer_sound_set_volume (kore_mixer_sound *sound, float value) |
| Sets the volume-multiplicator that's used when playing the sound. | |
Sounds are pre-decoded on load and therefore primarily useful for playing sound-effects.
| KORE_FUNC kore_mixer_sound * kore_mixer_sound_create_from_file | ( | const char * | filename | ) |
Create a sound from a wav or ogg file.
| filename | Path to a wav or ogg file |
| 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.
| audio_data | Path to ogg or mp3 data |
| size | Size of the audio_data |
| format | Type of the audio_data (wav or ogg) |
| 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.
| samples | The samples |
| samples_count | Number of samples |
| samples_per_second | The sample rate |
| stereo | Whether the samples are interleaved stereo or mono |
| KORE_FUNC void kore_mixer_sound_destroy | ( | kore_mixer_sound * | sound | ) |
Destroy a sound.
| sound | The sound to destroy. |
| 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.
| sound | The sound to modify |
| value | The volume-multiplicator to set |
| KORE_FUNC float kore_mixer_sound_volume | ( | kore_mixer_sound * | sound | ) |
Gets the current volume-multiplicator that's used when playing the sound.
| sound | The sound to query |