mirror of
https://github.com/thegatesbrowser/godot-multiplayer.git
synced 2025-10-16 02:03:43 -04:00
switch to two voip addon
This commit is contained in:
parent
cf11ceffc4
commit
9ce4caa073
39 changed files with 193 additions and 52 deletions
|
@ -8,9 +8,18 @@ class_name VoipUser
|
|||
var user_id: int
|
||||
var anchor: Node3D
|
||||
|
||||
var audiostreamopuschunked : AudioStreamOpusChunked
|
||||
var opuspacketsbuffer: Array[PackedByteArray] = []
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
user_data_events.user_volume_changed.connect(change_volume)
|
||||
audiostreamopuschunked = stream as AudioStreamOpusChunked
|
||||
|
||||
|
||||
func _process(_delta: float) -> void:
|
||||
while audiostreamopuschunked.chunk_space_available() and not opuspacketsbuffer.is_empty():
|
||||
audiostreamopuschunked.push_opus_packet(opuspacketsbuffer.pop_front(), 0, 0)
|
||||
|
||||
|
||||
func _physics_process(_delta: float) -> void:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue