duncanthrax / scream

Virtual network sound card for Microsoft Windows
Microsoft Public License
1.74k stars 147 forks source link

Linux Audio Host Can't playback input from two different scream audio machines. (only 1) #224

Closed jarrard closed 4 months ago

jarrard commented 4 months ago

As per topic title.

I have scream on my linux audio box but it will ignore other adapters and only use default.

WHAT do I do? run twin scream services specify each adapter or is there a twin adapter command I can't see?

DOES this work /usr/bin/scream -o pulse -t 20 -p 4010 -i virbr0 -i enp9s0

jarrard commented 4 months ago

Looks like I need to run twin service as it can't do both adapters.

Sadly this doesn't work, causes corruption.

So scream can't listen on two network devices at once.

jarrard commented 4 months ago

Almost solved it. Set SCREAM to unicast, have it run as unicast on main network adapter that both machines (inc virtual guest) can talk too and they can both send audio.

THE issue however is my server produces distorted audio (not guest). So I don't know how to fix this.

I just set unicast to port 4010.

Confusing but this seems to be a limitation or BUG/FAULT of scream where if you have multiple computers putting audio into server it will glitch out and pioritize one. So in this case my GUEST machine overrides of SERVER even if SERVER is started and synced with HOST (Scream Unicast) first.

I have confirmed by themselves and with 1 scream client connected that audio works perfectly. It's just when 2 scream clients are connected and the HOST (scream Unicast server) is playing audio also.

I'm not smart enough to understand the issue here. Maybe its hitting a channel limit or something else. I don't know, this will need expert input I feel.

jarrard commented 4 months ago

Updated title to reflect issue more.

Basically my OBS server playing scream audio now to Linux SCREAM host machine no problems.

Now if I login to the virtual machine it breaks the audio coming from OBS server.

Scream HOST can't accept audio from two different devices for some reason. I've got this setup as Unicast atm for DIRECT IP connect instead of allowing scream to automatically detect (which it fails to do correctly)

jarrard commented 4 months ago

The second the Windows 10 virtual machine guest transmits audio via its SCREAM device it causes the OBS server scream device to produce distorted broken audio, its hard to describe but its like the audio is being corrected by the GUEST machine.

PLEASE could someone help me understand what the issue is. There is so little documentated on this sort of thing and scream.

jarrard commented 4 months ago

I notice you can set server as multicast and clients as unicast.

This is what I'm using atm.

/usr/bin/scream -o pulse -t 20 -p 4010 -i enp9s0

However the second my virtual machine guest enables audio, it kills the obs server audio still.

jarrard commented 4 months ago

THE SOLUTION

RUN another scream server on a DIFFERENT PORT and setup the other windows machine to cast to that port. I use unicast to direct it at the host so signal doesn't get lost (happens).

So essentially I've got two services running now as per below. This works. No distortion or breaking.

/usr/bin/scream -o pulse -t 20 -p 4010 -i enp9s0 /usr/bin/scream -o pulse -t 20 -p 4011 -i enp9s0

PS. Probably worth enabling silencethreshold to reduce network traffic.