From bfdfe382b56afa2e8bb83d0b1bde53df1d11a215 Mon Sep 17 00:00:00 2001 From: hheik <4469778+hheik@users.noreply.github.com> Date: Tue, 12 Mar 2024 12:10:00 +0200 Subject: [PATCH] Added README.md --- README.md | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..c3ae2a7 --- /dev/null +++ b/README.md @@ -0,0 +1,43 @@ +# Rust Music Player +**Rust Music Player** (rmp), as the name suggests, is a music player written in rust using a terminal interface. + +This project is heavily inspired by [Music on Console](https://github.com/jonsafari/mocp) + +## Usage +Below are some examples of commandline arguments. +If you are using cargo, add `cargo run --` before any arguments. + +`rmp` +- Run the interface with the server in the background + +`rmp -s` +- Run only the server + +`rmp -c` +- Run only the client + +`rmp -x` +- Kill the server + +`rmp --help` +- For more help + +## Architecture +**rmp** uses a client/server architecture with interprocess communication. The interface is independent from the audio payback. + +This has several benefits: +- You can close the interface and keep the music playing +- Controlling the backend is easy to implement using commandline arguments, which makes scripting easier +- The interface stays responsive +- You can have multiple interfaces open at the same time, if needed + +## Requirements +Opus decoding depends on [libopus](https://opus-codec.org/) at the moment. + +Using apt: `sudo apt install libopus0` + +## Platform compability +Compability is tested only for linux, but all of the crates used (`rodio`, `crossterm`, `interprocess`) +should work cross-platform. + +There is some platform-specific code, which is only implemented for unix-like systems at the moment. See [os_unix.rs](src/os_unix.rs) for more info.