From 6aed119403ffb96c57aaad227092bc5e501cfae5 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 15 Feb 2020 09:32:05 +0100 Subject: [PATCH] - backported a few sound code fixes from Raze. --- src/sound/music/i_soundfont.cpp | 3 ++- src/sound/s_music.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/sound/music/i_soundfont.cpp b/src/sound/music/i_soundfont.cpp index f55ee208cf..b571b97539 100644 --- a/src/sound/music/i_soundfont.cpp +++ b/src/sound/music/i_soundfont.cpp @@ -42,6 +42,7 @@ #include "filereadermusicinterface.h" #include "zmusic/zmusic.h" #include "resourcefiles/resourcefile.h" +#include "version.h" //========================================================================== // @@ -424,7 +425,7 @@ void FSoundFontManager::CollectSoundfonts() if (soundfonts.Size() == 0) { - ProcessOneFile(NicePath("$PROGDIR/soundfonts/gzdoom.sf2")); + ProcessOneFile(NicePath("$PROGDIR/soundfonts/" GAMENAMELOWERCASE ".sf2")); } } diff --git a/src/sound/s_music.cpp b/src/sound/s_music.cpp index d36f7678e9..6b2881d125 100644 --- a/src/sound/s_music.cpp +++ b/src/sound/s_music.cpp @@ -141,7 +141,7 @@ void S_CreateStream() if (!mus_playing.handle) return; SoundStreamInfo fmt; ZMusic_GetStreamInfo(mus_playing.handle, &fmt); - if (fmt.mBufferSize > 0) + if (fmt.mBufferSize > 0) // if buffer size is 0 the library will play the song itself (e.g. Windows system synth.) { int flags = fmt.mNumChannels < 0 ? 0 : SoundStream::Float; if (abs(fmt.mNumChannels) < 2) flags |= SoundStream::Mono;