Skip to content

Commit

Permalink
- backported a few sound code fixes from Raze.
Browse files Browse the repository at this point in the history
  • Loading branch information
coelckers committed Feb 15, 2020
1 parent 617b6cd commit 6aed119
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/sound/music/i_soundfont.cpp
Expand Up @@ -42,6 +42,7 @@
#include "filereadermusicinterface.h"
#include "zmusic/zmusic.h"
#include "resourcefiles/resourcefile.h"
#include "version.h"

//==========================================================================
//
Expand Down Expand Up @@ -424,7 +425,7 @@ void FSoundFontManager::CollectSoundfonts()

if (soundfonts.Size() == 0)
{
ProcessOneFile(NicePath("$PROGDIR/soundfonts/gzdoom.sf2"));
ProcessOneFile(NicePath("$PROGDIR/soundfonts/" GAMENAMELOWERCASE ".sf2"));
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/sound/s_music.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit 6aed119

Please sign in to comment.