mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2025-01-19 05:30:49 +00:00
Merge branch 'master' of https://github.com/rheit/zdoom
This commit is contained in:
commit
48232f548d
2 changed files with 6 additions and 12 deletions
|
@ -462,14 +462,12 @@ public:
|
||||||
Stream->release();
|
Stream->release();
|
||||||
Channel = NULL;
|
Channel = NULL;
|
||||||
Stream = NULL;
|
Stream = NULL;
|
||||||
Owner->Sys->setStreamBufferSize(64*1024, FMOD_TIMEUNIT_RAWBYTES);
|
|
||||||
// Open the stream asynchronously, so we don't hang the game while trying to reconnect.
|
// Open the stream asynchronously, so we don't hang the game while trying to reconnect.
|
||||||
// (It would be nice to do the initial open asynchronously as well, but I'd need to rethink
|
// (It would be nice to do the initial open asynchronously as well, but I'd need to rethink
|
||||||
// the music system design to pull that off.)
|
// the music system design to pull that off.)
|
||||||
result = Owner->Sys->createSound(URL, (Loop ? FMOD_LOOP_NORMAL : FMOD_LOOP_OFF) | FMOD_SOFTWARE | FMOD_2D |
|
result = Owner->Sys->createSound(URL, (Loop ? FMOD_LOOP_NORMAL : FMOD_LOOP_OFF) | FMOD_SOFTWARE | FMOD_2D |
|
||||||
FMOD_CREATESTREAM | FMOD_NONBLOCKING, NULL, &Stream);
|
FMOD_CREATESTREAM | FMOD_NONBLOCKING, NULL, &Stream);
|
||||||
JustStarted = true;
|
JustStarted = true;
|
||||||
Owner->Sys->setStreamBufferSize(16*1024, FMOD_TIMEUNIT_RAWBYTES);
|
|
||||||
return result != FMOD_OK;
|
return result != FMOD_OK;
|
||||||
}
|
}
|
||||||
if (JustStarted && openstate == FMOD_OPENSTATE_PLAYING)
|
if (JustStarted && openstate == FMOD_OPENSTATE_PLAYING)
|
||||||
|
@ -1170,6 +1168,9 @@ bool FMODSoundRenderer::Init()
|
||||||
}
|
}
|
||||||
Sys->set3DSettings(0.5f, 96.f, 1.f);
|
Sys->set3DSettings(0.5f, 96.f, 1.f);
|
||||||
Sys->set3DRolloffCallback(RolloffCallback);
|
Sys->set3DRolloffCallback(RolloffCallback);
|
||||||
|
// The default is 16k, which periodically starves later FMOD versions
|
||||||
|
// when streaming FLAC files.
|
||||||
|
Sys->setStreamBufferSize(64*1024, FMOD_TIMEUNIT_RAWBYTES);
|
||||||
snd_sfxvolume.Callback ();
|
snd_sfxvolume.Callback ();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1733,10 +1734,6 @@ SoundStream *FMODSoundRenderer::OpenStream(const char *url, int flags)
|
||||||
exinfo.dlsname = patches;
|
exinfo.dlsname = patches;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Use a larger buffer for URLs so that it's less likely to be effected
|
|
||||||
// by hiccups in the data rate from the remote server.
|
|
||||||
Sys->setStreamBufferSize(64*1024, FMOD_TIMEUNIT_RAWBYTES);
|
|
||||||
|
|
||||||
result = Sys->createSound(url, mode, &exinfo, &stream);
|
result = Sys->createSound(url, mode, &exinfo, &stream);
|
||||||
if(result == FMOD_ERR_FORMAT && exinfo.dlsname != NULL)
|
if(result == FMOD_ERR_FORMAT && exinfo.dlsname != NULL)
|
||||||
{
|
{
|
||||||
|
@ -1748,9 +1745,6 @@ SoundStream *FMODSoundRenderer::OpenStream(const char *url, int flags)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Restore standard buffer size.
|
|
||||||
Sys->setStreamBufferSize(16*1024, FMOD_TIMEUNIT_RAWBYTES);
|
|
||||||
|
|
||||||
if(result != FMOD_OK)
|
if(result != FMOD_OK)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
|
|
@ -2439,7 +2439,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FadeIn)
|
||||||
if (flags & FTF_CLAMP)
|
if (flags & FTF_CLAMP)
|
||||||
self->alpha = (FRACUNIT * 1);
|
self->alpha = (FRACUNIT * 1);
|
||||||
if (flags & FTF_REMOVE)
|
if (flags & FTF_REMOVE)
|
||||||
self->Destroy();
|
P_RemoveThing(self);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2467,7 +2467,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FadeOut)
|
||||||
if (flags & FTF_CLAMP)
|
if (flags & FTF_CLAMP)
|
||||||
self->alpha = 0;
|
self->alpha = 0;
|
||||||
if (flags & FTF_REMOVE)
|
if (flags & FTF_REMOVE)
|
||||||
self->Destroy();
|
P_RemoveThing(self);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2515,7 +2515,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FadeTo)
|
||||||
}
|
}
|
||||||
if (self->alpha == target && (flags & FTF_REMOVE))
|
if (self->alpha == target && (flags & FTF_REMOVE))
|
||||||
{
|
{
|
||||||
self->Destroy();
|
P_RemoveThing(self);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue