diff options
| author | Aldrik Ramaekers <aldrik@amftech.nl> | 2023-12-24 11:19:35 +0100 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrik@amftech.nl> | 2023-12-24 11:19:35 +0100 |
| commit | ff3de32a164619ee1599c4f43600872f6cf955c4 (patch) | |
| tree | 34ad875d0ba1054e6dd7406f103101c480901309 /src/audio.c | |
| parent | cb9c0f812695da554e1feb5afe71b38324b65103 (diff) | |
music
Diffstat (limited to 'src/audio.c')
| -rw-r--r-- | src/audio.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/audio.c b/src/audio.c index f741570..696b9ec 100644 --- a/src/audio.c +++ b/src/audio.c @@ -132,6 +132,11 @@ void audio_channel_finished(int channel) { audio_channel_usage[channel] = false; } +void play_music(Mix_Music* music) { + Mix_FadeInMusic(music, -1, 2000); + Mix_VolumeMusic(MIX_MAX_VOLUME/4); +} + void play_positioned_sound(int channel, Mix_Chunk* wav, vec3f pos, float max_audible_dist) { player* p = get_player_by_id(player_id); if (!p) return; |
