From 5f9ed1979d5fe1294e297cfe3e9e98cace9c1186 Mon Sep 17 00:00:00 2001 From: Robert Fuchs Date: Fri, 26 Jul 2019 15:14:44 -0400 Subject: Allow setting buffer size of WebRTCDataChannel --- modules/webrtc/webrtc_data_channel.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'modules/webrtc/webrtc_data_channel.cpp') diff --git a/modules/webrtc/webrtc_data_channel.cpp b/modules/webrtc/webrtc_data_channel.cpp index 2bd30e68f5..7b3843410a 100644 --- a/modules/webrtc/webrtc_data_channel.cpp +++ b/modules/webrtc/webrtc_data_channel.cpp @@ -29,6 +29,7 @@ /*************************************************************************/ #include "webrtc_data_channel.h" +#include "core/project_settings.h" void WebRTCDataChannel::_bind_methods() { ClassDB::bind_method(D_METHOD("poll"), &WebRTCDataChannel::poll); @@ -58,6 +59,7 @@ void WebRTCDataChannel::_bind_methods() { } WebRTCDataChannel::WebRTCDataChannel() { + _in_buffer_shift = nearest_shift((int)GLOBAL_GET(WRTC_IN_BUF) - 1) + 10; } WebRTCDataChannel::~WebRTCDataChannel() { -- cgit v1.2.3