From 50989a83e72e37c0ac41b599b0b436b308b5b130 Mon Sep 17 00:00:00 2001 From: Layla Marchant Date: Fri, 2 Apr 2021 00:15:29 -0400 Subject: [PATCH] Further adjusted amplification difference, fixed makefile problems. --- music/Makefile.am | 2 +- src/audio.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/music/Makefile.am b/music/Makefile.am index 0e04b74..502e971 100644 --- a/music/Makefile.am +++ b/music/Makefile.am @@ -6,12 +6,12 @@ musicdir = $(pkgdatadir)/music nobase_dist_music_DATA = \ - death.ogg \ frozen_jam.ogg \ last_cyber_dance.ogg \ orbital_colossus.ogg \ railjet_short.ogg \ RE.ogg \ + reremix.ogg \ rise_of_spirit.ogg \ sound_and_silence.ogg \ space_dimensions.ogg \ diff --git a/src/audio.c b/src/audio.c index 28163c0..9e7362b 100644 --- a/src/audio.c +++ b/src/audio.c @@ -66,7 +66,7 @@ void audio_playSound(int sid, float x, float y) int angle = atanf((x - (screen->w / 2)) / (screen->w / 2)) * 180 / M_PI; int attenuation = fabsf(x - (screen->w / 2)) / (screen->w / 20); float distance = sqrtf(powf(fabsf(x - (screen->w / 2)), 2) + powf(fabsf(y - (screen->h / 2)), 2)); - const int max_volume = MIX_MAX_VOLUME / 2; + const int max_volume = MIX_MAX_VOLUME / 4; int volume = max_volume - (max_volume * distance / (3 * screen->w)); if ((!engine.useSound) || (!engine.useAudio) || (volume <= 0)) @@ -177,7 +177,7 @@ void audio_playMusic(const char *filename, int loops, int amplified) { audio_haltMusic(); music = Mix_LoadMUS(filename); - audio_setMusicVolume(amplified ? MIX_MAX_VOLUME : MIX_MAX_VOLUME / 2); + audio_setMusicVolume(amplified ? MIX_MAX_VOLUME : MIX_MAX_VOLUME / 4); Mix_PlayMusic(music, loops); } #endif