mirror of
https://github.com/ivabus/lonelyradio
synced 2024-11-21 23:55:09 +03:00
v0.2.2: Add monolib docs and readme
Signed-off-by: Ivan Bushchik <ivabus@ivabus.dev>
This commit is contained in:
parent
9165c43dae
commit
0afbed5758
8 changed files with 47 additions and 9 deletions
6
Cargo.lock
generated
6
Cargo.lock
generated
|
@ -597,7 +597,7 @@ checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lonelyradio"
|
name = "lonelyradio"
|
||||||
version = "0.2.1"
|
version = "0.2.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"chrono",
|
"chrono",
|
||||||
"clap",
|
"clap",
|
||||||
|
@ -653,7 +653,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "monoclient"
|
name = "monoclient"
|
||||||
version = "0.2.1"
|
version = "0.2.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"clap",
|
"clap",
|
||||||
"monolib",
|
"monolib",
|
||||||
|
@ -661,7 +661,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "monolib"
|
name = "monolib"
|
||||||
version = "0.2.1"
|
version = "0.2.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"byteorder",
|
"byteorder",
|
||||||
"rmp-serde",
|
"rmp-serde",
|
||||||
|
|
|
@ -4,7 +4,7 @@ members = [ "monoclient", "monolib"]
|
||||||
[package]
|
[package]
|
||||||
name = "lonelyradio"
|
name = "lonelyradio"
|
||||||
description = "TCP radio for lonely ones"
|
description = "TCP radio for lonely ones"
|
||||||
version = "0.2.1"
|
version = "0.2.2"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
authors = ["Ivan Bushchik <ivabus@ivabus.dev>"]
|
authors = ["Ivan Bushchik <ivabus@ivabus.dev>"]
|
||||||
|
|
|
@ -6,6 +6,12 @@ Radio that uses unencrypted TCP socket for broadcasting tagged audio data.
|
||||||
|
|
||||||
Decodes audio streams using [symphonia](https://github.com/pdeljanov/Symphonia).
|
Decodes audio streams using [symphonia](https://github.com/pdeljanov/Symphonia).
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
```shell
|
||||||
|
cargo install lonelyradio
|
||||||
|
```
|
||||||
|
|
||||||
## Build
|
## Build
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
|
@ -36,4 +42,4 @@ SwiftUI client is availible in [platform](./platform) directory.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
lonelyradio and monoclient are licensed under the terms of the [MIT license](./LICENSE).
|
lonelyradio, monolib and monoclient are licensed under the terms of the [MIT license](./LICENSE).
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "monoclient"
|
name = "monoclient"
|
||||||
version = "0.2.1"
|
version = "0.2.2"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "monolib"
|
name = "monolib"
|
||||||
version = "0.2.1"
|
version = "0.2.2"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
description = "A library implementing the lonely radio audio streaming protocol"
|
description = "A library implementing the lonely radio audio streaming protocol"
|
||||||
|
|
16
monolib/README.md
Normal file
16
monolib/README.md
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
# Monolib
|
||||||
|
|
||||||
|
A library implementing the lonely radio audio streaming protocol
|
||||||
|
|
||||||
|
## Documentation
|
||||||
|
|
||||||
|
[Docs.rs](https://docs.rs/monolib)
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
|
||||||
|
- [CLI](../monoclient)
|
||||||
|
- [SwiftUI](../platform/swiftui)
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
monolib is licensed under the terms of the [MIT license](../LICENSE).
|
|
@ -1,3 +1,19 @@
|
||||||
|
//! A library implementing the lonely radio audio streaming protocol
|
||||||
|
//!
|
||||||
|
//! Example usage (play for 10 seconds):
|
||||||
|
//! ```rust
|
||||||
|
//! extern crate monolib;
|
||||||
|
//! use std::thread::{sleep, spawn};
|
||||||
|
//! use std::time::Duration;
|
||||||
|
//!
|
||||||
|
//! spawn(|| monolib::run("someserver:someport"));
|
||||||
|
//! while monolib::get_metadata().is_none() {}
|
||||||
|
//! let seconds = md.length / md.sample_rate as u64 / 2;
|
||||||
|
//! println!("Playing: {} - {} - {} ({}:{:02})", md.artist, md.album, md.title, seconds / 60, seconds % 60);
|
||||||
|
//! sleep(Duration::from_secs(10));
|
||||||
|
//! monolib::stop();
|
||||||
|
//!```
|
||||||
|
|
||||||
/// Functions, providing C-like API
|
/// Functions, providing C-like API
|
||||||
pub mod c;
|
pub mod c;
|
||||||
|
|
||||||
|
|
|
@ -26,8 +26,8 @@ class MonoLib {
|
||||||
|
|
||||||
struct ContentView: View {
|
struct ContentView: View {
|
||||||
let timer = Timer.publish(every: 0.25, on: .main, in: .common).autoconnect()
|
let timer = Timer.publish(every: 0.25, on: .main, in: .common).autoconnect()
|
||||||
@State private var server: String = "ivabus.dev"
|
@State private var server: String = ""
|
||||||
@State private var port: String = "5894"
|
@State private var port: String = ""
|
||||||
@State private var playing: Bool = true
|
@State private var playing: Bool = true
|
||||||
@State private var running: Bool = false
|
@State private var running: Bool = false
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue