mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-12-11 04:51:13 +00:00
- backported a few sound code fixes from Raze.
This commit is contained in:
parent
462368b61d
commit
87875a52ba
2 changed files with 3 additions and 2 deletions
|
@ -44,6 +44,7 @@
|
|||
#include "filereadermusicinterface.h"
|
||||
#include "zmusic/zmusic.h"
|
||||
#include "resourcefiles/resourcefile.h"
|
||||
#include "version.h"
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
|
@ -426,7 +427,7 @@ void FSoundFontManager::CollectSoundfonts()
|
|||
|
||||
if (soundfonts.Size() == 0)
|
||||
{
|
||||
ProcessOneFile(NicePath("$PROGDIR/soundfonts/gzdoom.sf2"));
|
||||
ProcessOneFile(NicePath("$PROGDIR/soundfonts/" GAMENAMELOWERCASE ".sf2"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -142,7 +142,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;
|
||||
|
|
Loading…
Reference in a new issue