summaryrefslogtreecommitdiff
path: root/core/io/packet_peer.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-08-18 08:12:56 +0200
committerGitHub <noreply@github.com>2017-08-18 08:12:56 +0200
commit1a92906b681735a5a2acfd98e3d6a4c75a7f6115 (patch)
treef01757ba9a3b618df7da54b0698134b1a9f03e3f /core/io/packet_peer.cpp
parent3a4ff3402dedab5f30b0f97aeadec6cf61f29a40 (diff)
parenteab850524ead092ed9fe22e57955e59eae373b79 (diff)
Merge pull request #10406 from marcelofg55/closest_power_of_2
Add closest_power_of_2 func and implement mix_rate/latency on OS X
Diffstat (limited to 'core/io/packet_peer.cpp')
-rw-r--r--core/io/packet_peer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/io/packet_peer.cpp b/core/io/packet_peer.cpp
index f62ffd7183..66f8eea171 100644
--- a/core/io/packet_peer.cpp
+++ b/core/io/packet_peer.cpp
@@ -265,12 +265,12 @@ void PacketPeerStream::set_input_buffer_max_size(int p_max_size) {
ERR_EXPLAIN("Buffer in use, resizing would cause loss of data");
ERR_FAIL_COND(ring_buffer.data_left());
ring_buffer.resize(nearest_shift(p_max_size + 4));
- input_buffer.resize(nearest_power_of_2(p_max_size + 4));
+ input_buffer.resize(next_power_of_2(p_max_size + 4));
}
void PacketPeerStream::set_output_buffer_max_size(int p_max_size) {
- output_buffer.resize(nearest_power_of_2(p_max_size + 4));
+ output_buffer.resize(next_power_of_2(p_max_size + 4));
}
PacketPeerStream::PacketPeerStream() {