mkckr0/audio-share

[BUG] windows server stops sending audio after a few seconds

working-name opened this issue · 5 comments

Describe the bug
windows server stops transmitting sound after a few seconds - always. Then I have to stop server, and start server and reconnect from the remote phone to be able to hear again.

To Reproduce
Steps to reproduce the behavior:

  1. Start server on windows, select device to capture, start server.
  2. Connect from remote phone.
  3. Wait for audio to stop transmitting without a network disconnection.

Expected behavior
Windows server to not stop sending audio until you hit stop server.

Server (please complete the following information):

  • OS: Windows 11 23H2 (22631.2861)
  • GUI or CMD: GUI
  • Version 0.0.14.0/0.0.15.0

Android (please complete the following information):

  • Device: galaxy s23 ultra
  • OS: android 14
  • Version v0.0.14/15

Additional information

server.log:

[2024-01-13 11:24:46.090] [server] [info] tcp listen success on 192.168.10.85:65530
[2024-01-13 11:24:46.090] [server] [info] endpoint_id: {0.0.0.00000000}.{f315e3f8-fc1b-49bc-95dd-8ddfe6594514}
[2024-01-13 11:24:46.090] [server] [info] udp listen success on 192.168.10.85:65530
[2024-01-13 11:24:46.090] [server] [info] server started
[2024-01-13 11:24:46.090] [server] [info] select audio endpoint: Speakers (M-Audio M-Track Solo and Duo)
[2024-01-13 11:24:46.095] [server] [info] WAVEFORMATEX: wFormatTag: 65534, nBlockAlign: 8
[2024-01-13 11:24:46.095] [server] [info] AudioFormat:
format_tag: 3
channels: 2
sample_rate: 48000
bits_per_sample: 32

[2024-01-13 11:24:46.109] [server] [info] buffer size: 480000
[2024-01-13 11:24:46.114] [server] [info] device period: 3ms
[2024-01-13 11:24:50.576] [server] [info] accept 87.177.12.86:50642
[2024-01-13 11:25:21.090] [server] [info] accept_udp_loop No connection could be made because the target machine actively refused it.
[2024-01-13 11:25:25.442] [server] [info] close 87.177.12.86:50642
[2024-01-13 11:25:25.913] [server] [info] accept 87.177.12.86:43018
[2024-01-13 11:26:05.101] [server] [info] close 87.177.12.86:43018
[2024-01-13 11:26:05.481] [server] [info] accept 87.177.12.86:35222
[2024-01-13 11:27:19.661] [server] [info] tcp listen success on 192.168.10.85:65530
[2024-01-13 11:27:19.661] [server] [info] endpoint_id: {0.0.0.00000000}.{f315e3f8-fc1b-49bc-95dd-8ddfe6594514}
[2024-01-13 11:27:19.661] [server] [info] udp listen success on 192.168.10.85:65530
[2024-01-13 11:27:19.661] [server] [info] server started
[2024-01-13 11:27:19.661] [server] [info] select audio endpoint: Speakers (M-Audio M-Track Solo and Duo)
[2024-01-13 11:27:19.664] [server] [info] WAVEFORMATEX: wFormatTag: 65534, nBlockAlign: 8
[2024-01-13 11:27:19.664] [server] [info] AudioFormat:
format_tag: 3
channels: 2
sample_rate: 48000
bits_per_sample: 32

[2024-01-13 11:27:19.678] [server] [info] buffer size: 480000
[2024-01-13 11:27:19.680] [server] [info] device period: 3ms
[2024-01-13 11:27:26.009] [server] [info] accept 87.177.12.86:38038
[2024-01-13 11:27:56.682] [server] [info] accept_udp_loop No connection could be made because the target machine actively refused it.
[2024-01-13 11:28:00.108] [server] [info] server stopped
[2024-01-13 11:28:00.504] [server] [info] tcp listen success on 192.168.10.85:65530
[2024-01-13 11:28:00.504] [server] [info] udp listen success on 192.168.10.85:65530
[2024-01-13 11:28:00.504] [server] [info] endpoint_id: {0.0.0.00000000}.{f315e3f8-fc1b-49bc-95dd-8ddfe6594514}
[2024-01-13 11:28:00.504] [server] [info] server started
[2024-01-13 11:28:00.505] [server] [info] select audio endpoint: Speakers (M-Audio M-Track Solo and Duo)
[2024-01-13 11:28:00.506] [server] [info] WAVEFORMATEX: wFormatTag: 65534, nBlockAlign: 8
[2024-01-13 11:28:00.506] [server] [info] AudioFormat:
format_tag: 3
channels: 2
sample_rate: 48000
bits_per_sample: 32

[2024-01-13 11:28:00.517] [server] [info] buffer size: 480000
[2024-01-13 11:28:00.519] [server] [info] device period: 3ms
[2024-01-13 11:28:01.642] [server] [info] accept 87.177.12.86:48632
[2024-01-13 11:28:31.979] [server] [info] accept_udp_loop No connection could be made because the target machine actively refused it.
[2024-01-13 11:28:35.597] [server] [info] server stopped
[2024-01-13 11:28:35.948] [server] [info] tcp listen success on 192.168.10.85:65530
[2024-01-13 11:28:35.948] [server] [info] endpoint_id: {0.0.0.00000000}.{f315e3f8-fc1b-49bc-95dd-8ddfe6594514}
[2024-01-13 11:28:35.948] [server] [info] udp listen success on 192.168.10.85:65530
[2024-01-13 11:28:35.948] [server] [info] server started
[2024-01-13 11:28:35.948] [server] [info] select audio endpoint: Speakers (M-Audio M-Track Solo and Duo)
[2024-01-13 11:28:35.949] [server] [info] WAVEFORMATEX: wFormatTag: 65534, nBlockAlign: 8
[2024-01-13 11:28:35.949] [server] [info] AudioFormat:
format_tag: 3
channels: 2
sample_rate: 48000
bits_per_sample: 32

[2024-01-13 11:28:35.959] [server] [info] buffer size: 480000
[2024-01-13 11:28:35.963] [server] [info] device period: 3ms
[2024-01-13 11:28:37.497] [server] [info] accept 87.177.12.86:51344
[2024-01-13 11:29:07.865] [server] [info] accept_udp_loop No connection could be made because the target machine actively refused it.
[2024-01-13 11:29:14.655] [server] [info] close 87.177.12.86:51344
[2024-01-13 11:29:15.171] [server] [info] accept 87.177.12.86:60074
[2024-01-13 11:29:18.530] [server] [info] server stopped
[2024-01-13 11:29:18.763] [server] [info] tcp listen success on 192.168.10.85:65530
[2024-01-13 11:29:18.763] [server] [info] endpoint_id: {0.0.0.00000000}.{f315e3f8-fc1b-49bc-95dd-8ddfe6594514}
[2024-01-13 11:29:18.764] [server] [info] udp listen success on 192.168.10.85:65530
[2024-01-13 11:29:18.764] [server] [info] server started
[2024-01-13 11:29:18.764] [server] [info] select audio endpoint: Speakers (M-Audio M-Track Solo and Duo)
[2024-01-13 11:29:18.764] [server] [info] WAVEFORMATEX: wFormatTag: 65534, nBlockAlign: 8
[2024-01-13 11:29:18.764] [server] [info] AudioFormat:
format_tag: 3
channels: 2
sample_rate: 48000
bits_per_sample: 32

[2024-01-13 11:29:18.773] [server] [info] buffer size: 480000
[2024-01-13 11:29:18.775] [server] [info] device period: 3ms
[2024-01-13 11:29:19.907] [

Open the task manager to check the network traffic of "AudioShareServer.exe" to see whether it send packets.

It does, 3.1 Mbps on average. The app doesn't register a disconnect or timeout either.

If there is always 3.1Mbps even when no sound, then it's the network reason. The phone can't receive the UDP packet from PC and won't disconnect TCP connection. It's a kind of packet loss. Audio Share use UDP to transfer the audio data, so it doesn't have any gaurantee to let phone receive the packets.

You can connect the PC using LAN to test it and see whether keep hearing sound.

I'll close this issue. If you still have problem, you can reopen it.

Yeah I still have the problem, but somehow sonobus doesn't for example. Without me plugging in a CAT5 and being on the same physical network with the receiver which is impossible to do geographically. Anyway, it's fine, thanks for looking into it.