Unstable 0.1300.1.11

This commit is contained in:
Markus Isberg
2021-04-26 21:07:23 +03:00
parent 841d755394
commit 2c750282ec
76 changed files with 671 additions and 396 deletions
@@ -1,5 +1,6 @@
using Barotrauma.IO;
using Barotrauma.Networking;
using Concentus.Structs;
using Microsoft.Xna.Framework;
using OpenAL;
using System;
@@ -30,6 +31,8 @@ namespace Barotrauma.Sounds
private SoundChannel soundChannel;
private OpusDecoder decoder;
public bool UseRadioFilter;
public bool UseMuffleFilter;
@@ -65,7 +68,7 @@ namespace Barotrauma.Sounds
public VoipSound(string name, SoundManager owner, VoipQueue q) : base(owner, $"VoIP ({name})", true, true, getFullPath: false)
{
VoipConfig.SetupEncoding();
decoder = VoipConfig.CreateDecoder();
ALFormat = Al.FormatMono16;
SampleRate = VoipConfig.FREQUENCY;
@@ -152,7 +155,7 @@ namespace Barotrauma.Sounds
{
if (compressedSize > 0)
{
VoipConfig.Decoder.Decode(compressedBuffer, 0, compressedSize, buffer, 0, VoipConfig.BUFFER_SIZE);
decoder.Decode(compressedBuffer, 0, compressedSize, buffer, 0, VoipConfig.BUFFER_SIZE);
bufferID++;
return VoipConfig.BUFFER_SIZE;
}