Skip to content

Commit 919aab0

Browse files
Bump bliss version. Add symphonia
1 parent 117c49c commit 919aab0

File tree

6 files changed

+239
-7
lines changed

6 files changed

+239
-7
lines changed

.github/workflows/rust.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,5 @@ jobs:
2828
run: cargo build --verbose
2929
- name: Run tests
3030
run: cargo test --verbose --features=integration-tests
31+
- name: Run tests (symphonia)
32+
run: cargo test --verbose --features=integration-tests,symphonia

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Changelog
22

3-
## blissify 0.5.2
3+
## blissify 0.5.4
4+
* Bump bliss-rs to add the Symphonia decoder.
5+
6+
## blissify 0.5.3
47
* Bump bliss-rs.
58

69
## blissify 0.5.2

Cargo.lock

Lines changed: 211 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "blissify"
3-
version = "0.5.3"
3+
version = "0.5.4"
44
authors = ["Polochon-street <[email protected]>"]
55
edition = "2021"
66
license = "GPL-3.0-only"
@@ -19,9 +19,13 @@ rpi = ["bliss-audio/rpi"]
1919
# MPD installed for it to work, and it will launch its own instance of
2020
# MPD.
2121
integration-tests = ["bliss-audio/integration-tests"]
22+
# If you want to use the pure rust symphonia decoder, instead of ffmpeg.
23+
# Saves you an external dependency and the hassle of packaging, but is
24+
# slightly slower and less accurate.
25+
symphonia = ["bliss-audio/symphonia-all"]
2226

2327
[dependencies]
24-
bliss-audio = "0.9.4"
28+
bliss-audio = "0.10.0"
2529
mpd = "0.1.0"
2630
dirs = "3.0.1"
2731
tempdir = "0.3.7"

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,23 @@ On Archlinux:
3535

3636
$ sudo pacman -S base-devel clang ffmpeg sqlite
3737

38-
Finally, use `cargo install blissify` to install it.
38+
Finally, install it using:
39+
40+
$ cargo install blissify
3941

4042
Note: if you are using a raspberry pi and its corresponding ffmpeg
4143
(i.e. `ffmpeg -version|grep rpi` gives back something), use
4244
`cargo install --features=rpi blissify` instead.
4345

46+
By default, blissify uses [FFmpeg](https://www.ffmpeg.org/) to decode songs.
47+
Instead of using FFmpeg, you can also use
48+
[Symphonia](https://github.com/pdeljanov/Symphonia) by using the `symphonia`
49+
feature: `cargo install --features=symphonia`. Symphonia supports slightly
50+
less audio formats and the analysis results are slightly different than with
51+
ffmpeg, so make sure to always use either blissify compiled with Symphonia or
52+
blissify compiled with ffmepg - but do not mix both.
53+
Since Symphonia is written in pure Rust, you will
54+
remove the need for ffmpeg, which can be a quite big external dependency.
4455

4556
All the commands below read the `MPD_HOST` and `MPD_PORT` environment
4657
variables and try to reach MPD using that. You might want to change

src/main.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@ use std::{io::Read, os::unix::net::UnixStream};
4040
use termion::input::TermRead;
4141
use termion::raw::IntoRawMode;
4242

43-
use bliss_audio::decoder::ffmpeg::FFmpeg as Decoder;
43+
#[cfg(not(feature = "symphonia"))]
44+
use bliss_audio::decoder::ffmpeg::FFmpegDecoder as Decoder;
45+
#[cfg(feature = "symphonia")]
46+
use bliss_audio::decoder::symphonia::SymphoniaDecoder as Decoder;
4447

4548
/// The main struct that stores both the Library object, and some other
4649
/// helper functions to make everything work properly.

0 commit comments

Comments
 (0)