Skip to content

Andrews-Consulting/SimulAudio

Repository files navigation

SimulAudio Application v1.0
====================================

Based upon a 1-source-to-1-destination audio duplicator that I had and then 
refactored into the current 1-source-to-N-destinations fan-out design. 
We use it daily to listen to Windows audio on multiple Bluetooth speakers 
in different rooms in the house — currently a couple of Edifier R1280DBs in 
BT mode.


QUICK START (after installing)
------------------------------
1. Run SimulAudio.exe
2. Source Device: usually leave on the system default output (a non-BT
   device — Speakers, Headset, USB DAC, etc.). The app captures whatever
   Windows is rendering to that device.
3. Destination Devices: pick one or more BT speakers from the
   "Add destination" dropdown and click Add. Repeat for each speaker.
4. Click "Start Worker Task". You'll see "Buffering..." for ~1 second
   then "Active" — audio should start playing on all selected
   destinations.
5. Your selections (and the auto-reconnect setting) are saved
   automatically and restored on the next launch.


WHAT THIS APPLICATION DOES
---------------------------
Captures audio from a chosen output device using WASAPI loopback, then
fans the same stream out in parallel to N other output devices in
real-time. Each destination has its own ring buffer and (when needed)
its own sample-rate converter, so a slow or laggy destination can't
back-pressure the others.

The point: you can play system audio on two or more BT speakers in
different rooms with closely matching latency, instead of one trailing
the other.


REQUIREMENTS
------------
- Windows 10 or Windows 11
- .NET 9.0 Runtime installed
- Two or more audio output devices (one source, one or more destinations)


END USER FILES (when installed)
-------------------------------
- SimulAudio.exe       - The application
- SimulAudio.dll       - Application assembly
- NAudio*.dll          - Audio library (locally built fork)
- SimulAudio.runtimeconfig.json / .deps.json - Runtime config
- README.txt           - This file
- USER_GUIDE.md        - How to use the app


DEVELOPERS
----------
Built and developed in VS Code with the C# Dev Kit extension.

Prerequisites:
  - .NET 9.0 SDK
  - (For installer) Inno Setup 6 at the standard install path

The NAudio dependency is a local fork shipped under SimulAudio/Naudio/
(adds IDisposable to WaveInEventArgs to address a GC-pressure crash
seen in the stock library). It's referenced via <Reference> in the
.csproj — there is no NuGet step.

Build (Debug or Release):
    dotnet build SimulAudio.sln -c [Debug|Release]

Publish framework-dependent Release for distribution:
    dotnet publish SimulAudio/SimulAudio.csproj -c Release -r win-x64 ^
        --self-contained false -o publish

Build the installer:
    "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" SimulAudioInstaller.iss

The Build-Installer.bat and Publish-Release.bat wrappers exist for
double-click use; they end with `pause` so they don't fit running from
a non-interactive shell.

See plans/current-design.md for the full architecture overview, and
plans/build-steps.md for the exact command sequence used to ship.


TROUBLESHOOTING
---------------
- If a destination doesn't appear in the dropdown, make sure it's
  connected and active in Windows Sound settings.
- If audio is dropping out, try a higher Buffer Configuration setting
  (the slider). The default "Balanced" is 2 seconds; "High Stability"
  is 5 seconds. Larger = more resilient to BT codec hiccups,
  noticeably longer startup delay.
- If a destination disappears (BT speaker powered off), the worker
  detects it and stops that destination's playback while keeping the
  others going. With Auto-Reconnect Bluetooth on, the app will pick
  the device back up when it reappears.
- For deeper diagnostic info, see %LOCALAPPDATA%\SimulAudio\crash.log
  (only populated if the app encounters an unhandled exception).


SUPPORT
-------
For usage questions, see USER_GUIDE.md.
For architecture / design questions, see plans/current-design.md.


VERSION
-------
Version 1.0 - Initial release of this better version.


CREDITS
-------
Thanks to Mark Heath and everyone who worked on NAudio.

About

Intercept audio output and send it to multiple Bluetooth devices. Used to support party mode with BT devices

Topics

Resources

License

MIT, MIT licenses found

Licenses found

MIT
license.txt
MIT
NAudio_License.txt

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors