# sb-send

# sb-send

Send audio to Sonobus clients with little overhead.

Connects to SonoBus connection server and sends audio to group members.

## Building

| Target | Build Command | Input Source |
|--------|--------------|--------------|
| Linux ALSA | `make` | ALSA capture |
| Windows WASAPI | `make win` | WASAPI capture |
| Portable | `make stdin` | stdin (s16le 48kHz) |
| macOS | `make stdin` | stdin (s16le 48kHz) |

For Windows build instructions see `doc/windows/build.txt`.

Windows static binaries are provided in the `bin/` directory on release tags only.

## Features

- Low CPU usage (~15% of 1 RK3328 core in testing)
- Ignores other copies of sb-send to reduce network traffic
- Includes `sb-rec` program to receive a single stream from a named Sonobus or sb-send group member and write s16le 48000Hz to stdout
- stdin input includes ring buffer, time pacing, and back pressure for realtime playback from files
- Run with `-h` for usage information

## About

I love Sonobus and really appreciate the author. Thanks so much Jesse, you rock!!!

Sonobus is a program designed for people to make music together who cannot be together physically. I ended up using it as an audio mixer for multiple computers - like the X server of audio.

I had a need to create sender clients that did not use the full resources of a full Sonobus instance with a live audio mixer. sb-send happened.

This program sends audio to Sonobus group members, that is all.

I looked at the Sonobus code to make this, but the Sonobus project has nothing to do with sb-send.

**Official Sonobus site:** https://sonobus.net

**sb-send Distribution site:** https://gfc.rocks/git/sonobus-send

No release tarballs will be provided going forward. Please just use git.

## Notes

All of this was produced with the help of LLM assistants. See `doc/prompt.txt` for the prompt used to get started.

`doc/protocol.txt` contains AI-generated descriptions of header files.

## Contact

Mastodon: ground024@mastodon.gfc.rocks

---

## License

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

It is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY. See the GNU General Public License for more details.

This program incorporates code derived from Sonobus (GPLv3+).

### GPL Section 7 Exception

As a special exception to the terms and conditions of the GNU General Public License Version 3 (the "GPL"): As additional permission under section 7, you are allowed to distribute the software through an app store, even if that store has restrictive terms and conditions that are incompatible with the GPL, provided that the source is also available under the GPL with or without this permission through a channel without those restrictive terms and conditions.

---

### Opus Codec License (BSD-style)

Copyright 2001-2023 Xiph.Org, Skype Limited, Octasic, Jean-Marc Valin, Timothy B. Terriberry, CSIRO, Gregory Maxwell, Mark Borgerding, Erik de Castro Lopo, Mozilla, Amazon

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Opus is subject to the royalty-free patent licenses specified at:
- Xiph.Org Foundation: https://datatracker.ietf.org/ipr/1524/
- Microsoft Corporation: https://datatracker.ietf.org/ipr/1914/
- Broadcom Corporation: https://datatracker.ietf.org/ipr/1526/
