Unstable v0.1300.0.0 (February 19th 2021)

This commit is contained in:
Joonas Rikkonen
2021-02-25 13:44:23 +02:00
parent b772654326
commit 24cbef485a
441 changed files with 21343 additions and 8562 deletions
@@ -736,11 +736,6 @@ namespace Barotrauma.Sounds
if (FilledByNetwork)
{
if (Sound is VoipSound voipSound)
{
voipSound.ApplyFilters(buffer, readSamples);
}
if (readSamples <= 0)
{
streamAmplitude *= 0.5f;
@@ -752,13 +747,18 @@ namespace Barotrauma.Sounds
}
else
{
if (Sound is VoipSound voipSound)
{
voipSound.ApplyFilters(buffer, readSamples);
}
decayTimer = 0;
}
}
else if (Sound.StreamsReliably)
{
streamSeekPos += readSamples;
if (readSamples < STREAM_BUFFER_SIZE)
streamSeekPos += readSamples * 2;
if (readSamples * 2 < STREAM_BUFFER_SIZE)
{
if (looping)
{
@@ -775,7 +775,7 @@ namespace Barotrauma.Sounds
{
streamBufferAmplitudes[index] = readAmplitude;
Al.BufferData<short>(streamBuffers[index], Sound.ALFormat, buffer, readSamples, Sound.SampleRate);
Al.BufferData<short>(streamBuffers[index], Sound.ALFormat, buffer, readSamples * 2, Sound.SampleRate);
alError = Al.GetError();
if (alError != Al.NoError)