mirror of
https://github.com/librespot-org/librespot.git
synced 2026-04-27 08:15:50 +03:00
[PR #601] [MERGED] [Tokio migration] Make RodioSink Send and other improvements #992
Labels
No labels
A-Alsa
SpotifyAPI
Tokio 1.0
audio
bug
can't reproduce
compilation
dependencies
duplicate
enhancement
good first issue
help wanted
high priority
imported
imported
invalid
new api
pull-request
question
reverse engineering
wiki
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/librespot#992
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/librespot-org/librespot/pull/601
Author: @Johannesd3
Created: 2/12/2021
Status: ✅ Merged
Merged: 2/20/2021
Merged by: @ashthespy
Base:
tokio_migration← Head:tokio_migration📝 Commits (4)
2f05ddfFix bugs in playerb2f1be4MakeRodioSinkSendand improve error handling689415aImproved error handling in rodio backendb77f0a1Fix formatting📊 Changes
5 files changed (+152 additions, -92 deletions)
View changed files
📝
Cargo.lock(+1 -0)📝
core/src/connection/mod.rs(+1 -1)📝
playback/Cargo.toml(+6 -3)📝
playback/src/audio_backend/rodio.rs(+127 -71)📝
playback/src/player.rs(+17 -17)📄 Description
Firstly, this PR fixes two bugs in the playback crate (well, I also introduced them).
Secondly,
RodioSinkwas modified such that it implementsSendnow. The solution spawns an own thread to create therodio::OutputStream. WhenRodioSinkis dropped, this thread is notified via a channel and theOutputStreamis dropped as well. SoRodioSinkdoesn't carry theOutputStreamanymore and is nowSend.I also used this occasion to improve the error handling in the
RodioSinkusingthiserror, but this should only be the beginning.If it's ok, I will continue with those relatively small PRs for the tokio migration, so it's easier to follow what I'm doing and easier to contribute.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.