mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-02-18 01:21:32 +00:00
- backported a few sound code fixes from Raze.
This commit is contained in:
parent
617b6cd987
commit
6aed119403
2 changed files with 3 additions and 2 deletions
|
@ -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"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue