Open Titruc opened 1 month ago
extends Node
var effect : AudioEffect var mic_capture: VOIPInputCapture @export var output : AudioStreamPlayer3D
func _ready(): var idx = AudioServer.get_bus_index("mic") mic_capture = AudioServer.get_bus_effect(idx, 0) mic_capture.packet_ready.connect(_on_packet_ready) print("effect")
func _process(delta): processVoice()
func processVoice(): mic_capture.send_test_packets()
func _on_packet_ready(packet : PackedByteArray): rpc("voice_packet_received", packet)
@rpc("any_peer", "call_remote", "unreliable_ordered", 1)
func voice_packet_received(packet: PackedByteArray) -> void:
print(packet.size())
output.stream.push_packet(packet)
output.play()
var packet2 = packet
print("haaa")
all print pass, the data is send (in the network debug tool i see 29B in rpc incoming and outcoming) (here the project if you want more investigation : https://github.com/Titruc/IDWN)
i have troubles using this librairy so i test in my project, all thing was working except the fact than AudioStreamVOIP doesn't output any sound, so i test some demo project thatuse your addons but in every project no audio was output,i'm on godot 4.2 i hope it's a real issue and not just me who is stupid, thanks for the help, here's the code and the node so you can see :