Scream - Virtual network sound card for Microsoft Windows

Related tags

Audio scream
Overview

Scream - Virtual network sound card for Microsoft Windows

Scream is a virtual device driver for Windows that provides a discrete sound device. Audio played through this device is published on your local network as a PCM multicast stream.

Receivers on the network can pick up the stream and play it through their own audio outputs. Receivers are available for Unix/Linux (interfacing with PulseAudio or ALSA) and for Windows.

For the special scenario of a Windows guest on a QEMU host, @martinellimarco has contributed support for transferring audio via the IVSHMEM driver mechanism, similar to the GPU pass-through software "Looking Glass". See the section on IVSHMEM below.

Scream is based on Microsoft's MSVAD audio driver sample code. The original code is licensed under MS-PL, as are my changes and additions. See LICENSE for the actual license text.

Download and install

A ZIP file containing a signed x64 build is available on the GitHub releases page. The "installer" is a batch file that needs to be run with administrator rights.

The build is supposed to run on all x64 versions of Windows 7 through Windows 10.

Installation on Windows 10 version 1607 and newer

Microsoft has recently tightened the rules for signing kernel drivers. These new rules apply to newer Windows 10 installations which were not upgraded from an earlier version. If your installation is subject to these rules, the driver will not install.

However, cross-signed kernel drivers are still accepted by Windows 10 version 1607 (and greater) if any of the following exceptions apply:

  • The driver is a boot-up driver
  • Windows 10 was upgraded from a version preceding 1607
  • Secure Boot is disabled in BIOS or not available at all
  • The driver was signed with a certificate issued before 29 July 2015
  • A special registry value has been set, thereby allowing cross-signed drivers to load on systems with Secure Boot enabled

Workaround #1: Disable secure boot in BIOS. For more information, see this issue.

Workaround #2: Add this special registry value:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CI\Policy]
"UpgradedSystem"=dword:00000001

Please review the following resources for more information.

Receivers

  • Unix with Pulseaudio, JACK or ALSA: Not included in the installer package. Please see the README in the Receivers/unix folder. Various contributors have written code for this receiver:

    • @roovio: JACK support.
    • @ivan: Original ALSA code.
    • @martinellimarco: IVSHMEM support.
    • @accumulator: Refactoring into single binary and cmake support.
    • @F5OEO: Raw output support.
  • Windows: ScreamReader, contributed by @MrShoenel. Included in the installer package as of version 1.2. This receiver does not support positional mapping of multichannel (more than stereo) setups - meaning a mismatch in speaker setup can lead to channels being played in the wrong position.

  • A 3rd-party receiver that supports Scream streams is https://github.com/mincequi/cornrow. It's primarily meant for embedded devices.

  • @tomek-o wrote receivers for low-power embedded systems, great for building ethernet-attached active speakers.

Receivers can usually be run as unprivileged users. Receiver systems that have an input firewall need to open UDP port 4010, or whatever custom port you use.

Functional description

All audio played through the Scream device will be put onto the local LAN as a multicast stream (using unicast is optional - see below). Delay is minimal, since all processing is done on kernel level. There is no userspace portion.

The multicast target address and port is "239.255.77.77:4010". The audio is a raw PCM stream. The default sampling rate and size can be set as the "Default format" in the driver "Advanced" property page. The default speaker/channel configuration can be set on the "Configure" dialog of the Scream sound device.

Data is transferred in UDP frames with a payload size of max. 1157 bytes, consisting of 5 bytes header and 1152 bytes PCM data. The latter number is divisible by 4, 6 and 8, so a full number of samples for all channels will always fit into a packet. The first header byte denotes the sampling rate. Bit 7 specifies the base rate: 0 for 48kHz, 1 for 44,1kHz. Other bits specify the multiplier for the base rate. The second header byte denotes the sampling width, in bits. The third header byte denotes the number of channels being transferred. The fourth and fifth header bytes make up the DWORD dwChannelMask from Microsofts WAVEFORMATEXTENSIBLE structure, describing the mapping of channels to speaker positions.

Receivers simply need to read the stream off the network and stuff it into a local audio sink. The receiver system's kernel should automatically do the necessary IGMP signalling, so it's usually sufficient to just open a multicast listen socket and start reading from it. Minimal buffering (~ 4 times the UDP payload size) should be done to account for jitter.

Setting the sampling rate (optional)

To satisfy your audiophile feelings, or to reduce unnecessary resampling, you might want to set a higher sampling rate and/or sampling width. You can do that on the driver "Advanced" property page, as shown below. Warning: using high sampling freqs with 24/32 bits width in combination with multichannel can lead to high bit rates on the network. We recommend to stick to 48kHz/16 bits for 5.1 or higher channel modes.

Setting up default speaker configuration (optional)

Thanks to the great work of @martinellimarco, if your target system has a multichannel speaker setup, you can extend that to Windows as well. Use the "Configure" wizard of the sound device driver dialog, as shown below. Please note that this is just a system default, and that application software (like games) may require their own settings to be made.

Using unicast instead of multicast (optional)

This is only recommended if multicast gives you problems. Tweak the registry in the manner depicted in this screenshot (you will have to create the "Options" key), then reboot:

Using IVSHMEM between Windows guest and Linux host

This can be used as an alternative to the default networked transfer when using QEMU/KVM.

  • Add a IVSHMEM device to your VM. We recommend a size of 2MB. If you use other IVSHMEM devices, we recommend to use the same domain and bus, just varying the slot numbers. Here is a config example:
...

...
 
   
   2
   
... ...

Alternatively, for those who don't use libvirt, here is an example for the relevant parts of a QEMU command line:

...
-device ivshmem-plain,memdev=ivshmem_scream \
-object memory-backend-file,id=ivshmem_scream,share=on,mem-path=/dev/shm/scream-ivshmem,size=2M \
...
  • Install the IVSHMEM driver from here. As is Windows will automatically install a dummy driver for the IVSHMEM device. To use the IVSHMEM device the PCI standard RAM Controller in the System Devices node must be manually updated with the one downloaded above.
  • To make the driver use IVSHMEM, add a DWORD HKLM\SYSTEM\CurrentControlSet\Services\Scream\Options\UseIVSHMEM, with the value being the size of the device in MB (2, as recommended). Please note that scream will identify the device by its size, so you should only have one IVSHMEM device with that specific size. Also note that you might have to create the Options key. You can also paste this command into an admin CMD shell to create both key and DWORD: REG ADD HKLM\SYSTEM\CurrentControlSet\Services\Scream\Options /v UseIVSHMEM /t REG_DWORD /d 2
  • When the VM is running, check if the device exists as /dev/shm/scream-ivshmem, and if the user you want to run the receiver as has read access. If so, run a IVSHMEM-capable receiver with the path of the SHM file as commandline parameter, for example: scream -m /dev/shm/scream-ivshmem

Building

Visual Studio and a recent WDK are required. Good luck!

Issues
  • 24 Bit Sampling Size / Width / Depth?

    24 Bit Sampling Size / Width / Depth?

    Sorry for my poor English.

    I just set the sampling depth and sampling rate to 24 bit, 48KHz in Windows, but according to the Linux receiver, it still receives a 32 bit audio stream, and the bandwidth cost is also as twice as 16 bit takes.

    image image

    How can I get a 24 bit audio stream? I need to reduce sampling depth to save the bandwidth...

    I'm using Windows 11 Build 25126 (Dev Channel), Scream 3.9, and the latest unix receiver (caf77e5).

    opened by tnqzh123 0
  • Jack auto-connections cause crash in 7.1 surround

    Jack auto-connections cause crash in 7.1 surround

    I'm using pipewire btw.

    When scream is in jack mode with 7.1 surround the output has multiple outputs as it should be. The problem is that the scream node connects to my main output until it fills all the inputs. Once the inputs are filled it is randomly connecting to different nodes. When it does this it crashes. Is there a way to disable auto-connection and let a program like qjackctl handle the connections?

    Ouput

    Switched sample rate 48000, sample size 32 and 8 channels
    JACK sample rate 48000
    registered jack port 'Front Left' for channel 0
    registered jack port 'Front Right' for channel 1
    registered jack port 'Front Center' for channel 2
    registered jack port 'LFE / Subwoofer' for channel 3
    registered jack port 'Rear Left' for channel 4
    registered jack port 'Rear Right' for channel 5
    channel 0 connected to output port Main_Headphone Audio/Sink sink:playback_FL
    channel 1 connected to output port Main_Headphone Audio/Sink sink:playback_FR
    channel 2 connected to output port WH-1000XM3:playback_FL
    channel 3 connected to output port WH-1000XM3:playback_FR
    channel 4 connected to output port Family 17h (Models 00h-0fh) HD Audio Controller Analog Stereo:playback_FL
    channel 5 connected to output port Family 17h (Models 00h-0fh) HD Audio Controller Analog Stereo:playback_FR
    Segmentation fault (core dumped)
    

    I found a workaround for the moment.

    1. First create a sink with 8 channels for surround. pactl load-module module-null-sink media.class=Audio/Sink sink_name=TestSurround channel_map=surround-71

    2. Then run the scream instance with pulse. scream -u -p 4011 -o pulse

    3. Using pavucontrol set output of the scream instance to the new sink.

    The connections will be established once you play audio through windows. If the audio is played before setting the output to sink then it crashes like before.

    opened by Not-a-true-statement 0
  • Was is the best receiver on headless raspberry pi

    Was is the best receiver on headless raspberry pi

    Wireless gaming headset using a raspberry pi

    There are so many options ?

    It seems that raspberry pi runs pulseaudio out of the box... ? Is that the best ?

    opened by shodanx2 1
  • OPUS support (with forward error correction ?)

    OPUS support (with forward error correction ?)

    Hi there, This project is what's I've been looking for ! Although I see it's streaming in PCM ?

    Classical excuse for why you can't stream audio on WiFi is that jitter is too high. Solution to this is to use efficient compression

    I think Opus codec is fully open source with excellent compression and small packet sizes (it goes below 10ms !)

    I believe this project would greatly benefit from a Opus stream compression

    WIth ability to enable AND disable FEC (foward error correction), it sends some extra data for the client to rebuild the stream in case of damage

    Ability to change frame size

    Ability to change bitrate (including switching between constant and variable bitrate)

    opened by shodanx2 0
  • Scream inhibits screensaver on Windows 10

    Scream inhibits screensaver on Windows 10

    I've been diagnosing a problem with screensaver activation recently and it seems that it has to do with scream. Upon executing powercfg /requests in an admin cmd, it reports that scream is making a power request. When I tried using a request override, i have had no results.

    opened by BackThrowTheBaguetteBrawler 0
  • Distribute Scream installer as an MSI

    Distribute Scream installer as an MSI

    I'd like to get Scream into winget-pkgs but to do so the application needs some form of non-interactive application installer that isn't contained in a zip file

    opened by PAI5REECHO 0
Releases(3.9)
  • 3.9(Jan 11, 2022)

  • 3.8(Aug 1, 2021)

    This release fixes a potential BSOD when using the optional Silence Detection feature. More importantly, it adds ARM64 and (for nostalgic persons) X86 builds. Since I have neither X86 nor ARM64 platforms for testing, please provide any feedback on these builds if you happen to use them.

    Source code(tar.gz)
    Source code(zip)
    Scream3.8.zip(600.07 KB)
  • 3.7(Jun 18, 2021)

    Another summer, another binary. This driver release adds two optional features from contributors:

    • Allow binding to local (source) IP and Port via registry settings (thanks to JP Morrison).
    • Silence suppression, in order not to send network traffic if a sound source hogs the device while not playing (thanks to Andy Clegg).

    ScreamReader rebuilt, some small fixes by JP Morrison. Also using the latest WDK to build, using Spectre mitigation, for what it's worth.

    If you don't need the new features, there's no need to upgrade the driver. No hidden improvements of any kind. Please enjoy the summer.

    Source code(tar.gz)
    Source code(zip)
    Scream3.7.zip(499.94 KB)
  • 3.6(Jul 6, 2020)

    Three years have gone, so I had to sacrifice around 180 bucks to the X509 gods again. This driver has a signature that is blessed until July 2023. No functional changes to the previous version. No need to upgrade, since signatures are only checked at install time.

    Source code(tar.gz)
    Source code(zip)
    Scream3.6.zip(502.33 KB)
  • 3.5(Apr 27, 2020)

    Again, the driver is unchanged in this release. I'm doing these artefact gymnastics to get Github to add a release tag to the repo in the "usual" format. That should give Linux distro maintainers a hint which receiver code they should wrap into their packages. If you have a running system, there's no point in upgrading.

    Source code(tar.gz)
    Source code(zip)
    Scream3.5.zip(500.84 KB)
  • 3.4(Apr 27, 2020)

    The driver in this release package is unchanged from 3.3. The relevant change is in the Windows client ScreamReader which now uses WASAPI instead of WaveOut. This fixes multichannel mappings for those who use this client. If you don't use Windows as a client, there is no need to upgrade.

    Source code(tar.gz)
    Source code(zip)
    Scream3.4.zip(500.84 KB)
  • 3.3(Jun 6, 2019)

  • 3.2(May 11, 2019)

  • 3.1(Apr 25, 2019)

    This release adds support for transferring audio data from a Windows guest to a Linux host via IVSHMEM, a shared-memory driver for QEMU guests, courtesy of @martinellimarco. When active, this mechanism replaces the networked transfer. To use this, you also need the matching flavor of receiver, available for both Pulse and ALSA.

    Source code(tar.gz)
    Source code(zip)
    Scream3.1.zip(500.96 KB)
  • 3.0(Apr 13, 2019)

    Thanks to @martinellimarco , this release adds support for multichannel layouts, from mono all the way up to eight channels (7.1 surround). Since this change requires existing users to replace their receivers as well, this is another major version bump.

    Source code(tar.gz)
    Source code(zip)
    Scream3.0.zip(499.35 KB)
  • 2.0(Nov 30, 2018)

  • 1.5(Jun 4, 2018)

    This release fixes #10. When launching the receiver into a running stream, it was possible that L/R channels ended up reversed. This should not have bothered you much if your receiver machine is the "long-running" one. No other changes.

    Source code(tar.gz)
    Source code(zip)
    Scream1.5.zip(488.55 KB)
  • 1.4(May 18, 2018)

  • 1.3(Apr 14, 2018)

    This release fixes a (rare) bluescreen that supposedly occurs when Windows would page out part of the driver code. Since the issue is hard to reproduce, I'm not 100% sure if the fix helps. If i've interpreted the code correctly, it should. If you get a DRIVER_IRQL_NOT_LESS_OR_EQUAL bugcheck, try this one.

    Source code(tar.gz)
    Source code(zip)
    Scream1.3.zip(488.56 KB)
  • 1.2(Sep 30, 2017)

  • 1.1(Jul 5, 2017)

Owner
Tom Kistner
Tom Kistner
A C library for reading and writing sound files containing sampled audio data.

libsndfile libsndfile is a C library for reading and writing files containing sampled audio data. Authors The libsndfile project was originally develo

null 1k Jun 21, 2022
highly efficient sound library for the Gameboy Advance

The Apex Audio System (AAS) is a sound library for the GBA. It includes a highly efficient mixer, MOD playing routines and support for up to 16 channels. It is designed for developers using a GCC-based development environment. AAS uses RAW, WAV or *tracker 1-16 channel MOD files as input.

Ties Stuij 30 Jun 13, 2022
Automatic Volume Adjuster for TVs and Sound Systems

Automatic Volume Adjuster Recently Great Scott built his version of an automatic volume adjuster. In this project he solved one of the biggest problem

Stefan Wagner 22 Jan 16, 2022
SSMLSDL - Simple Sound Manipulation Library, Based on SDL and LIBWAV.

SSM-lib SSMLSDL - Simple Sound Manipulation Library, Based on SDL and LIBWAV. This library is open source and free software. It's aims to provide YOU,

UtoECat 1 Jan 20, 2022
straightforward CLI tool for spectral analysis of sound files

dowser dowser is (presently) a quick and simple low-level utility for performing spectral analysis of sound files. usage dowser

ezra buchla 12 Dec 18, 2021
Open source digital sound effects based on JACK audio connection kit.

Noiseworks Digital Audio Effects Repository Open source digital sound effects based on JACK audio connection kit. This repository is intended to provi

null 3 May 24, 2022
OBS Plugin with image that reacts to sound source.

OBS Image Reaction Plugin Image that reacts to sound source. Installing binaries Download binaries from Releases. For Windows, Move the contents of pl

null 26 Jun 27, 2022
A tiny, header only, easy to use, cross-platform, portaudio wrapper, sound and notation manager, tailored for the demo scene.

TDAW A tiny, header only, easy to use, cross-platform, portaudio wrapper, sound and notation manager, tailored for the demo scene. This header enables

kbx 9 Jun 12, 2022
An OBS plugin for Zoom/Meet-like virtual background feature.

OBS Virtual background plugin English / Japanese OBS Virtual background plugin is a plugin for OBS. This plugin allows you to crop the background area

KOUNOIKE Yuusuke 148 Jun 23, 2022
Audacity is an easy-to-use, multi-track audio editor and recorder for Windows, Mac OS X, GNU/Linux and other operating systems

Audacity is an easy-to-use, multi-track audio editor and recorder for Windows, Mac OS X, GNU/Linux and other operating systems. Audacity is open source software licensed under GPL, version 2 or later.

Audacity 7.6k Jun 23, 2022
Sneedacity (formerly Audacity) is an easy-to-use, multi-track audio editor and recorder for Windows, Mac OS X, GNU/Linux and other operating systems.

Sneedacity (formerly Audacity) is an easy-to-use, multi-track audio editor and recorder for Windows, Mac OS X, GNU/Linux and other operating systems. Sneedacity is open source software licensed under GPL, version 2 or later.

Sneed's Feed & Seed 868 Jun 26, 2022
Tenacity is an easy-to-use, cross-platform multi-track audio editor/recorder for Windows, MacOS, GNU/Linux

Tenacity is an easy-to-use, cross-platform multi-track audio editor/recorder for Windows, MacOS, GNU/Linux and other operating systems and is developed by a group of volunteers as open source software.

null 7.2k Jun 26, 2022
An OBS plugin that allows capture of independant application audio streams on Windows, in a similar fashion to OBS's game capture and Discord's application streaming.

win-capture-audio An OBS plugin based on OBS's win-capture/game-capture that hooks WASAPI's audio output functions (rather than the various graphics A

Joe Kaushal 2.3k Jun 24, 2022
eSpeak NG is a compact open source software text-to-speech synthesizer for Linux, Windows, Android and other operating systems

eSpeak NG is an open source speech synthesizer that supports more than hundred languages and accents.

null 1.4k Jun 24, 2022
🎵 A cross-platform media playback library for C/C++ with good number of features (only Windows & Linux).

libwinmedia A cross-platform media playback library for C/C++ & Flutter with good number of features. Example A very simple example can be as follows.

Harmonoid 38 Jun 24, 2022
A virtual network Differential GNSS server-client project using Precise Point Positioning (PPP). Global coverage. Without physical base station construction needed. An open-source virtual base station approach.

Virtual-Network-DGNSS-Project This project is the software implementation for a publicly available, open-source, client/server VN-DGNSS implementation

null 10 May 20, 2022
RetroWave is a hardware sound board series that uses vintage sound chips and works with modern hardware.

RetroWave Authentic sounds from vintage sound chips, on modern hardware! Introduction RetroWave is a hardware sound board series that uses vintage sou

SudoMaker 42 Jun 5, 2022
Windows 2000 styled installer for Panther based distributions of Microsoft Windows (WIM files).

An advanced installer for Microsoft Windows that mimics the looks of the Windows XP and older installers. Takes any modern (Vista and newer) Windows ISO or WIM file and creates a old styled Windows Setup experience on the go.

null 2 Mar 17, 2022
Header-only C++14 library for getting network addresses associated with network interface without name lookups on Windows, macOS, Linux, and FreeBSD

NetIF Get addresses associated with network interfaces on a system without using name lookups. Header-only, requires C++14. Usage Add the header file

GMLC-TDC 9 Feb 4, 2022
Netif - Header-only C++14 library for getting network addresses associated with network interface without name lookups on Windows, macOS, Linux, and FreeBSD

NetIF Get addresses associated with network interfaces on a system without using name lookups. Header-only, requires C++14. Usage Add the header file

GMLC-TDC 9 Feb 4, 2022
A modern dynamically typed programming language that gets compiled to bytecode and is run in a virtual machine called SVM (Strawbry Virtual Machine).

Strawbry A bytecode programming language. Here is what I want Strawbry to look like: var a = 1 var b = 2 var c = a + b print(c) func sqrt(x) { re

PlebusSupremus1234 6 Jan 5, 2022
Professor Terence Parr has taught us how to create a virtual machine Now it is time to pwn virtual machine

My First real world CTF Simple Virtual Machine Challenge description Professor Terence Parr has taught us how to create a virtual machine Now it is ti

null 1 Feb 17, 2022
This repo contains Direct3D 9, Direct3D 10, a few Direct3D 11, and DirectSound C++ samples from the legacy DirectX SDK updated to build using the Windows 10 SDK and the Microsoft.DXSDK.D3DX NuGet package

DirectX SDK Legacy Samples This repo contains Direct3D 9, Direct3D 10, a few Direct3D 11, and DirectSound samples that originally shipped in the legac

Chuck Walbourn 33 Jun 21, 2022
CVE-­2021­-1732 Microsoft Windows 10 本地提权漏 研究及Poc/Exploit开发

CVE-2021-1732 CVE-2021-1732 Microsoft Windows 10 本地提权漏 研究及Poc/Exploit开发 受影响系统及应用版本 Windows Server, version 20H2 (Server Core Installation) Windows 10

null 74 Jun 13, 2022
wtf is a distributed, code-coverage guided, customizable, cross-platform snapshot-based fuzzer designed for attacking user and / or kernel-mode targets running on Microsoft Windows.

wtf is a distributed, code-coverage guided, customizable, cross-platform snapshot-based fuzzer designed for attacking user and / or kernel-mode targets running on Microsoft Windows.

Axel Souchet 917 Jun 24, 2022
Find patterns of vulnerabilities on Windows in order to find 0-day and write exploits of 1-days. We use Microsoft security updates in order to find the patterns.

Back 2 the Future Find patterns of vulnerabilities on Windows in order to find 0-day and write exploits of 1-days. We use Microsoft security updates i

SafeBreach Labs 90 Jun 14, 2022
Bobby Cooke 266 Jun 20, 2022
A memory allocation program, it is used for doing an experiment to find out the detail of Microsoft Windows taskmgr performance information

memory-allocation-test A memory allocation program, it is used for doing an experiment to find out the detail of Microsoft Windows taskmgr performance

Chang Wei 3 Nov 17, 2021
Free open-source modern C++17 / C++20 framework to create console, forms (GUI like WinForms) and unit test applications on Microsoft Windows, Apple macOS and Linux.

xtd Modern C++17/20 framework to create console (CLI), forms (GUI like WinForms) and tunit (unit tests like Microsoft Unit Testing Framework) applicat

Gammasoft 320 Jun 25, 2022