From b5e0ea2bd308239b2f5f98b0dd4e4971a53818f7 Mon Sep 17 00:00:00 2001 From: JasonLG1979 Date: Thu, 22 Jun 2023 02:06:24 -0500 Subject: [PATCH] Fix examples and update change log --- CHANGELOG.md | 4 ++++ examples/play.rs | 3 ++- examples/play_connect.rs | 3 ++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0de0ad1f..7a2d91e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -64,6 +64,7 @@ https://github.com/librespot-org/librespot - [playback] The passthrough decoder is now feature-gated (breaking) - [playback] `rodio`: call play and pause - [protocol] protobufs have been updated +- [playback] Moved audio processing with the exception of decoding out of `player` (breaking) ### Added @@ -98,6 +99,8 @@ https://github.com/librespot-org/librespot - [playback] Add metadata support via a `TrackChanged` event - [connect] Add `activate` and `load` functions to `Spirc`, allowing control over local connect sessions - [metadata] Add `Lyrics` +- [playback] Add `normaliser`, `resampler` and `sample_pipeline`. +- [playback] Add resampling support to 48kHz, 88.2kHz, and 96kHz. ### Fixed @@ -115,6 +118,7 @@ https://github.com/librespot-org/librespot - [playback] Handle seek, pause, and play commands while loading - [playback] Handle disabled normalisation correctly when using fixed volume - [metadata] Fix missing colon when converting named spotify IDs to URIs +- [playback] Better thread handling in `player`. ## [0.4.2] - 2022-07-29 diff --git a/examples/play.rs b/examples/play.rs index eb7dc382..a3196fcf 100644 --- a/examples/play.rs +++ b/examples/play.rs @@ -20,6 +20,7 @@ async fn main() { let session_config = SessionConfig::default(); let player_config = PlayerConfig::default(); let audio_format = AudioFormat::default(); + let sample_rate = player_config.sample_rate.as_u32(); let args: Vec<_> = env::args().collect(); if args.len() != 4 { @@ -41,7 +42,7 @@ async fn main() { } let mut player = Player::new(player_config, session, Box::new(NoOpVolume), move || { - backend(None, audio_format) + backend(None, audio_format, sample_rate) }); player.load(track, true, 0); diff --git a/examples/play_connect.rs b/examples/play_connect.rs index 2b23a7d3..f7a84d43 100644 --- a/examples/play_connect.rs +++ b/examples/play_connect.rs @@ -25,6 +25,7 @@ async fn main() { let player_config = PlayerConfig::default(); let audio_format = AudioFormat::default(); let connect_config = ConnectConfig::default(); + let sample_rate = player_config.sample_rate.as_u32(); let mut args: Vec<_> = env::args().collect(); let context_uri = if args.len() == 4 { @@ -46,7 +47,7 @@ async fn main() { player_config, session.clone(), Box::new(NoOpVolume), - move || backend(None, audio_format), + move || backend(None, audio_format, sample_rate), ); let (spirc, spirc_task) = Spirc::new(