RevoluPowered / one-voip-godot-4

One voip plugin to rule them all
MIT License
63 stars 4 forks source link

AudioStreamVOIP doesn't output any sound #23

Open Titruc opened 1 month ago

Titruc commented 1 month ago

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 :

Titruc commented 1 month ago

extends Node

var effect : AudioEffect var mic_capture: VOIPInputCapture @export var output : AudioStreamPlayer3D

Called when the node enters the scene tree for the first time.

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()

print("haa")

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") image4 image5 image image2 image3

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)