Skip to content

Commit

Permalink
0.5.0: FLAC support, new GUI player, volume settings
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Bushchik <[email protected]>
  • Loading branch information
ivabus committed May 30, 2024
1 parent 39cc35e commit ff52e14
Show file tree
Hide file tree
Showing 17 changed files with 5,271 additions and 578 deletions.
4,172 changes: 3,710 additions & 462 deletions Cargo.lock

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@
members = [
"lonelyradio_types",
"monoclient",
"monoclient-s",
"monolib",
"monoloader",
"platform/gtk",
"microserve",
]

[package]
name = "lonelyradio"
description = "TCP radio for lonely ones"
version = "0.4.0"
version = "0.5.0"
edition = "2021"
license = "MIT"
authors = ["Ivan Bushchik <[email protected]>"]
Expand Down Expand Up @@ -42,8 +43,10 @@ async-stream = "0.3.5"
tokio-stream = { version = "0.1.15", features = ["sync"] }
futures-util = "0.3.30"
samplerate = "0.2.4"
lonelyradio_types = { path = "./lonelyradio_types" }
lonelyradio_types = { version = "0.5.0", path = "./lonelyradio_types" }
once_cell = "1.19.0"
flacenc = { version = "0.4.0", default-features = false }

[profile.release]
opt-level = 3
strip = true
52 changes: 41 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,77 @@
# lonelyradio

> TCP radio for singles
Radio that uses unencrypted TCP socket for broadcasting tagged audio data.
Broadcast audio over the internet.

Decodes audio streams using [symphonia](https://github.com/pdeljanov/Symphonia).

## Install
Optionally transcodes audio into and from FLAC using [flacenc-rs](https://github.com/yotarok/flacenc-rs/) and [claxon](https://github.com/ruuda/claxon).

## Installation

### Install music server

```shell
cargo install --git https://github.com/ivabus/lonelyradio --tag 0.5.0 lonelyradio
```

### Install CLI client

```shell
cargo install lonelyradio
cargo install --git https://github.com/ivabus/lonelyradio --tag 0.5.0 monoclient
```

## Build
### Install GUI (Slint) client

```shell
cargo build -r
cargo install --git https://github.com/ivabus/lonelyradio --tag 0.5.0 monoclient-s
```

## Run

```
lonelyradio <MUSIC_FOLDER> [-a <ADDRESS:PORT>] [-p] [-w] [-m|--max-samplerate M]
lonelyradio [-a <ADDRESS:PORT>] [-p|--public-log] [-w|--war] [-m|--max-samplerate M] [--xor-key-file FILE] [--no-resampling] [-f|--flac] <MUSIC_FOLDER>
```

All files (recursively) will be shuffled and played back. Public log will be displayed to stdout, private to stderr.

`-m|--max-samplerate M` will resample tracks which samplerate exceeds M to M

`--xor-key-file FILE` will XOR all outgoing bytes looping through FILE

`-f|--flac` will enable (experimental) FLAC compression

### Clients

[monoclient](./monoclient) is a recommended CLI client for lonelyradio that uses [monolib](./monolib)
[monoclient](./monoclient) is a recommended CLI player for lonelyradio that uses [monolib](./monolib)

```shell
monoclient <SERVER>:<PORT>
```

[monoclient-s](./monoclient-s) is a experimental GUI player for lonelyradio built with [Slint](https://slint.dev)

```shell
monoclient-s
```

Desktop integration will be added later.

### Other clients

SwiftUI client is availible in [platform](./platform) directory.

[monolib](./monolib) provides lonelyradio-compatible C API for creating custom clients.
[monoloader](./monoloader) is a tool, that allows you to download individual audio tracks from lonelyradio-compatible servers.

[monolib](./monolib) provides a C API compatible with lonelyradio for creating custom clients.

#### monolib API stability

As lonelyradio has not yet reached its first major release, the API may (and will) break at any point.

### Microphone server

Experimental server (lonelyradio-compatible) for streaming audio from your microphone is available in the [microserve](./microserve) crate.

## License

lonelyradio, monolib and monoclient are licensed under the terms of the [MIT license](./LICENSE).
lonelyradio, monolib and monoclient, as well as all other crates in this repository, are licensed under the terms of the [MIT license](./LICENSE).
8 changes: 5 additions & 3 deletions lonelyradio_types/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
[package]
name = "lonelyradio_types"
version = "0.4.0"
description = "Shared types for lonelyradio"
license = "MIT"
version = "0.5.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
authors = ["Ivan Bushchik <[email protected]>"]
repository = "https://github.com/ivabus/lonelyradio"

[dependencies]
serde = { version = "1.0.197", features = ["derive"] }
8 changes: 2 additions & 6 deletions lonelyradio_types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,14 @@ pub struct TrackMetadata {
pub track_length_frac: f32,
pub channels: u16,
pub sample_rate: u32,
pub flac: bool,
pub title: String,
pub album: String,
pub artist: String,
}

#[derive(Deserialize, Serialize, Clone, Debug, PartialEq)]
pub struct FragmentMetadata {
// In samples
// In samples or bytes (if FLAC)
pub length: u64,
}

#[derive(Deserialize, Serialize, Clone, Debug, PartialEq)]
pub struct SessionSettings {
pub gzip: bool,
}
Loading

0 comments on commit ff52e14

Please sign in to comment.