v1.5.7.0 (Summer Update)
This commit is contained in:
@@ -1,19 +1,10 @@
|
||||
using Concentus.Enums;
|
||||
using Concentus.Structs;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Barotrauma.Networking
|
||||
{
|
||||
static partial class VoipConfig
|
||||
{
|
||||
public const int FREQUENCY = 48000; //48Khz
|
||||
public const int BITRATE = 16000; //16Kbps
|
||||
public const int BUFFER_SIZE = (8 * MAX_COMPRESSED_SIZE * FREQUENCY) / BITRATE; //20ms window
|
||||
|
||||
public static OpusEncoder CreateEncoder()
|
||||
{
|
||||
var encoder = new OpusEncoder(FREQUENCY, 1, OpusApplication.OPUS_APPLICATION_VOIP);
|
||||
@@ -22,10 +13,5 @@ namespace Barotrauma.Networking
|
||||
encoder.SignalType = OpusSignal.OPUS_SIGNAL_VOICE;
|
||||
return encoder;
|
||||
}
|
||||
|
||||
public static OpusDecoder CreateDecoder()
|
||||
{
|
||||
return new OpusDecoder(FREQUENCY, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user