18 lines
484 B
C
18 lines
484 B
C
#include "sounds.h"
|
|
|
|
void soundsLoad(SoundState *sounds, SoundType type, f32 interval, const char *path) {
|
|
Sound newSound = LoadSound(path);
|
|
sounds->sounds[type] = newSound;
|
|
sounds->soundInterval[type] = interval;
|
|
sounds->playing = newSound;
|
|
}
|
|
void soundsPlay(SoundState *sounds, SoundType type) {
|
|
PlaySound(sounds->playing);
|
|
}
|
|
|
|
void soundsUnloadAll(SoundState *sounds) {
|
|
for (i32 i = 0; i < SOUND_COUNT; i++) {
|
|
UnloadSound(sounds->sounds[i]);
|
|
}
|
|
}
|