Fix examples and update change log

This commit is contained in:
JasonLG1979 2023-06-22 02:06:24 -05:00
parent 586e9f1929
commit b5e0ea2bd3
3 changed files with 8 additions and 2 deletions

View file

@ -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

View file

@ -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);

View file

@ -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(