A lightweight, low-latency C# WPF application that captures your system's audio and routes it to multiple hardware output devices simultaneously. Built entirely on the Windows Core Audio API (WASAPI) using the NAudio library.
demo.mp4
- Multi-Endpoint Routing: Play a single audio source (like a YouTube video or Spotify or any audio source) through multiple headphones or speakers at the exact same time.
- Aggressive Latency Control: Implements a custom ring-buffer clearing strategy to combat hardware clock drift, ensuring secondary devices stay within ~10-30ms of real-time.
- Anti-Feedback Loop Protection: Automatically detects your default Windows playback device and prevents audio from being routed back into it, completely eliminating infinite echo loops.
- Dynamic Device Scanning: Easily refresh the device list to detect newly plugged-in USB or Bluetooth headphones without restarting the app.
- Modern UI: Built with Windows Presentation Foundation (WPF) featuring a sleek, dark-mode graphical interface.
The application uses WasapiLoopbackCapture to intercept the raw audio bytes flowing to your default Windows audio endpoint.
When the user clicks "Connect", the app initializes a separate WasapiOut stream for every selected hardware device in Shared Mode. As Windows fires DataAvailable events containing the live audio bytes, the application aggressively broadcasts those bytes into a BufferedWaveProvider attached to every selected output.
You do not need to install anything to use SoundSync!
- Go to the Releases Page.
- Download SoundSync-Portable.exe.
- Double-click the file to run it. That's it!
- If you face any issue, open the application with "Run as Administrator".
(Note: If you download the smaller SoundSync-Light.exe version, you must have the .NET 8.0 Desktop Runtime installed on your PC).
- Clone the repository:
git clone https://github.com/sugumar247/SoundSync.git
- Open
SoundSync.slnxin Visual Studio 2022. - The project relies on the NAudio library. Visual Studio should restore this NuGet package automatically. If not, run:
dotnet restore
- Press
F5to compile and run the application.
If you are trying to share a movie with a friend using two pairs of headphones, you will notice a slight ~30ms delay on the 2nd pair of headphones if you capture audio directly from the 1st pair.
To achieve 100.00% perfect synchronization with zero echoes, use the "Dummy Hardware" trick:
- Look at your Windows sound settings and find an audio device you aren't currently using (e.g., an HDMI Monitor with no speakers, or a Virtual Audio Cable like VB-Audio Cable).
- Set that silent device as your Default Windows Output. (Your computer will go silent).
- Open SoundSync.
- Check the boxes for Headphone 1 and Headphone 2 or more.
- Click Connect.
The app will now capture the silent audio stream, duplicate it, and push it to both sets of headphones via the C# engine. Because they share the exact same routing path, their latency is identical and they are perfectly synchronized!
- C# / .NET 8.0 - The core framework
- WPF - UI Framework
- NAudio - Audio and WASAPI interaction
Contributions, issues, and feature requests are welcome!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.