Comments (4)
I experienced the same problem and found the issue was with the Virtualbox net adapter taking priority for multicast. It works if you add the registry keys for Unicast, but found the audio is too choppy to be usable over WiFi from laptop to desktop plugged into gigabit ethernet. Confirmed the virtual sound card works on Windows 10 Build 1809 too.
from scream.
Have you solved the issue?
from scream.
Hey guys. The example @duncanthrax has for the windows c# UDP client does not work at all. I ended up hand programming a UDP client with Visual C++ and I managed to get it to work. Here's the code (please bare in mind that this code is NOT cleaned up at all and should only be used for demo purposes):
UDP_Client.h
#ifndef UDP_CLIENT_H_
#define UDP_CLIENT_H_
#define _WINSOCK_DEPRECATED_NO_WARNINGS
#include<stdio.h>
#include<winsock2.h>
#include <iostream>
using namespace std;
#pragma comment(lib,"ws2_32.lib") //Winsock Library
#define SERVER "127.0.0.1" //ip address of udp server
#define BUFLEN 1500 //Max length of buffer
#define PORT 4011 //The port on which to listen for incoming data
struct UDP_CLIENT {
struct sockaddr_in si_other;
int s, slen = sizeof(si_other);
char buf[BUFLEN];
char message[BUFLEN];
WSADATA wsa;
};
void Initialize_UDP_CLIENT(UDP_CLIENT*);
int Receive_UDP_CLIENT(UDP_CLIENT*, char*, int);
void Close_UDP_CLIENT(UDP_CLIENT*);
#endif
UDP_Client.cpp
#include "UDP_Client.h"
void Initialize_UDP_CLIENT(UDP_CLIENT* client) {
//Initialise winsock
printf("\nInitialising Winsock...");
if (WSAStartup(MAKEWORD(2, 2), &client->wsa) != 0)
{
printf("Failed. Error Code : %d", WSAGetLastError());
exit(EXIT_FAILURE);
}
printf("Initialised.\n");
//create socket
if ((client->s = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) == SOCKET_ERROR) {
printf("socket() failed with error code : %d", WSAGetLastError());
exit(EXIT_FAILURE);
}
int opt = 1;
if (setsockopt(client->s, SOL_SOCKET, SO_REUSEADDR, (const char *)&opt, sizeof(opt)) < 0) {
printf("setsockopt() failed with error code : %d", WSAGetLastError());
exit(EXIT_FAILURE);
}
u_long nMode = 1; // 0: BLOCKING
if (ioctlsocket(client->s, FIONBIO, &nMode) == SOCKET_ERROR) {
printf("ioctlsocket() failed with error code : %d", WSAGetLastError());
exit(EXIT_FAILURE);
}
//setup address structure
memset((char *)&client->si_other, 0, sizeof(client->si_other));
client->si_other.sin_family = AF_INET;
client->si_other.sin_port = htons(PORT);
client->si_other.sin_addr.s_addr = inet_addr(SERVER);
int bind_status = bind(client->s, (SOCKADDR *)&client->si_other, sizeof(client->si_other));
cout << bind_status << " " << WSAGetLastError() << endl;
}
int Receive_UDP_CLIENT(UDP_CLIENT* client, char* buffer, int size) {
return recvfrom(client->s, buffer, size, 0, (struct sockaddr *) &client->si_other, &client->slen);
/*
if (received_size == SOCKET_ERROR)
{
printf("recvfrom() failed with error code : %d", WSAGetLastError());
exit(EXIT_FAILURE);
}
*/
//return received_size;
}
void Close_UDP_CLIENT(UDP_CLIENT* client) {
closesocket(client->s);
WSACleanup();
}
from scream.
Just call Receive_UDP_CLIENT in a loop. If you have any trouble assembling the PCM let me know!
from scream.
Related Issues (20)
- Add UPnP compatibility HOT 1
- Scream not working with Equalizer Apo HOT 1
- Service file? HOT 1
- Is it possible to add multiple virtual sound card? HOT 1
- Installation fails on Windows 11 ARM64 HOT 2
- Scream forces to send audio data to Radmin VPN HOT 1
- Please extend support to >8 channels (e.g. Atmos is 7.1.4 (12ch)) HOT 4
- Updating drivers for *Scream from `\Scream\Install\driver\x64\Scream.inf` HOT 11
- Uninstall driver
- can ScreamReader windows support for unicast? can ffmpeg's ffplay.exe recieve pcm stream?
- IPv6 multicast and unicast support
- Install fail in 22H2, new workaround found HOT 7
- asio4all support
- PipeWire support HOT 1
- glitchy sound after sleep+wake on windows
- Streaming stopped working on Windows 11 after Nov update, driver reports no issues HOT 1
- Blue screen while install driver on windows 7
- Certificate from Tom is not valid anymore HOT 5
- Rocksmith 2014 no audio output detected
- Installation fails on Windows 11 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scream.