haileys / bark Goto Github PK
View Code? Open in Web Editor NEWlive sync audio streaming for local networks
License: GNU Affero General Public License v3.0
live sync audio streaming for local networks
License: GNU Affero General Public License v3.0
on musl libc, the sched_param
struct has more fields:
pub struct sched_param {
pub sched_priority: ::c_int,
#[cfg(any(target_env = "musl", target_os = "emscripten", target_env = "ohos"))]
pub sched_ss_low_priority: ::c_int,
#[cfg(any(target_env = "musl", target_os = "emscripten", target_env = "ohos"))]
pub sched_ss_repl_period: ::timespec,
#[cfg(any(target_env = "musl", target_os = "emscripten", target_env = "ohos"))]
pub sched_ss_init_budget: ::timespec,
#[cfg(any(target_env = "musl", target_os = "emscripten", target_env = "ohos"))]
pub sched_ss_max_repl: ::c_int,
}
without them, compiling bark fails:
Compiling bark v0.1.0
error[E0063]: missing fields `sched_ss_init_budget`, `sched_ss_low_priority`, `sched_ss_max_repl` and 1 other field in initializer of `sched_param`
--> src/thread.rs:19:14
|
19 | &libc::sched_param {
| ^^^^^^^^^^^^^^^^^ missing `sched_ss_init_budget`, `sched_ss_low_priority`, `sched_ss_max_repl` and 1 other field
For more information about this error, try `rustc --explain E0063`.
error: could not compile `bark` (bin "bark") due to previous error
Just some quick notes on build instructions.
I'm doing this on Fedora, so I'm just writing down those instructions
speexdsp-devel
, apt: libspeexdsp-dev
), alsacargo build
cross-compiling (eg raspberry pi) fedora:
binutils-arm-linux-gnu
, gcc-arm-linux-gnu
/ binutils-aarch64-linux-gnu
, gcc-aarch64-linux-gnu
)rustup target add arm-unknown-linux-gnueabihf
/ rustup target add aarch64-unknown-linux-gnu
/ etc)PKG_CONFIG_SYSROOT_DIR=/usr/aarch64-linux-gnu cargo build --target aarch64-unknown-linux-gnu
/ PKG_CONFIG_SYSROOT_DIR=/usr/arm-none-eabi cargo build --target arm-unknown-linux-gnueabihf
actually, i never figured out how to fix the linking errors on fedora (i think it's trying to link in the x86 libraries into the arm binaries), so I'm just going to compile on the Pis.
Hi,
My name is Tim Curtis. I'm the maintainer for the moOde audio player project (a FOSS non-commercial project). It's an MPD based player/streamer for the Raspberry Pi family of SBC's.
https://github.com/moode-player
https://moodeaudio.org
One of our Forum users mentioned your nice project today https://moodeaudio.org/forum/showthread.php?tid=5734&pid=48016#pid48016 and I wanted to follow up with you to see if you might be interested in discussing integration of your software into moOde.
Currently we are using the TRX Realtime audio over IP toolset to implement our Multiroom Audio feature and it's working ok. It uses Multicast, RTP/UDP, ALSA directly, the Opus CODEC (16/48K) for the audio format and does not support clock sync but rather simply relies on low network latency. It also doesn't support playback on the sending device. The sender reads PCM from the ALSA Loopback device and the Receiver outputs to either ALSA plughw:n,m or hw:n,m device.
Clock sync would be a nice enhancement for us and since you are using raw uncompressed PCM format possibly a way to support native source rates, mostly 16/44.1K but also the usual "HiRes" rates up to 24/192K. Also support for having the sending device also be a receiver.
Regards,
-Tim
Here's some additional background info on our solution.
https://github.com/bitkeeper/trx/releases/tag/0.6
#
# Sender
#
pi@moode:~ $ trx-tx -H
trx 0.6.0
(C) Copyright 2020 Mark Hills <[email protected]>
(C) Copyright 2021 Tim Curtis <[email protected]>
Usage: tx [<parameters>]
Real-time audio transmitter over IP
Audio device (ALSA) parameters:
-d <dev> Device name (default 'default')
-m <ms> Buffer time (default 16 milliseconds)
Network parameters:
-h <addr> IP address to send to (default ::)
-p <port> UDP port number (default 1350)
Encoding parameters:
-r <rate> Sample rate (default 48000 Hz, see (1) below.)
-c <n> Number of channels (default 2)
-f <n> Frame size (default 960 samples, see (2) below)
-b <kbps> Bitrate (approx., default 128)
Program parameters:
-v <n> Verbosity level (default 1)
-D <file> Run as a daemon, writing process ID to the given file
-R <prio> Realtime priority (default 45)
-H Print program help
(1) Sampling rate (-r) of the input signal (Hz) This must be one
of 8000, 12000, 16000, 24000, or 48000.
(2) Allowed frame sizes (-f) are defined by the Opus codec. For example,
at 48000 Hz the permitted values are 120, 240, 480, 960, 1920 or 2880 which
correspond to 2.5, 7.5, 10, 20, 40 or 60 milliseconds respectively.
### From PHP
$cmd = 'trx-tx -d trx_send -h ' . $cfgMultiroom['tx_host'] . ' -p ' . $cfgMultiroom['tx_port'] . ' -m ' . $cfgMultiroom['tx_bfr'] . ' -f ' . $cfgMultiroom['tx_frame_size'] . ' -R ' . $cfgMultiroom['tx_rtprio'] . ' -D /tmp/trx-txpid >/dev/null';
$result = shell_exec($cmd);
#
# Receiver
#
pi@moode:~ $ trx-rx -H
trx 0.6.0
(C) Copyright 2020 Mark Hills <[email protected]>
(C) Copyright 2021 Tim Curtis <[email protected]>
Usage: rx [<parameters>]
Real-time audio receiver over IP
Audio device (ALSA) parameters:
-d <dev> Device name (default 'default')
-m <ms> Buffer time (default 16 milliseconds)
Network parameters:
-h <addr> IP address to listen on (default ::)
-p <port> UDP port number (default 1350)
-j <ms> Jitter buffer (default 16 milliseconds)
Encoding parameters (must match sender):
-r <rate> Sample rate (default 48000 Hz)
-c <n> Number of channels (default 2)
-f <n> Frame size (default 960 samples, see (1) below)
Program parameters:
-v <n> Verbosity level (default 1)
-D <file> Run as a daemon, writing process ID to the given file
-R <prio> Realtime priority (default 45)
-H Print program help
(1) Allowed frame sizes (-f) are defined by the Opus codec. For example,
at 48000 Hz the permitted values are 120, 240, 480, 960, 1920 or 2880 which
correspond to 2.5, 7.5, 10, 20, 40 or 60 milliseconds respectively.
### From PHP
$cmd = 'trx-rx -d ' . $cfgMultiroom['rx_alsa_output_mode'] . ':' . $_SESSION['cardnum'] . ',0 -h ' . $cfgMultiroom['rx_host'] . ' -p ' . $cfgMultiroom['rx_port'] . ' -m ' . $cfgMultiroom['rx_bfr'] . ' -j ' . $cfgMultiroom['rx_jitter_bfr'] . ' -f ' . $cfgMultiroom['rx_frame_size'] . ' -R ' . $cfgMultiroom['rx_rtprio'] . ' -D /tmp/trx-rxpid >/dev/null';
$result = shell_exec($cmd);
Hi there, I stumbled upon this project and have absolutely no experience in HIFI or multiroom audio. Could you please just sum up a few points how this is similar / different to snapcast? approach? Bark looks nice so far and I'm wondering if it would be compatible with esp32 / esp8266 based qC solutions?
currently, when pactl
is unavailable, bark falls back to a "default audio device"; as such, it's not possible to explicitly specify an output device like hw:0,2
when using pure alsa
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.