-
Notifications
You must be signed in to change notification settings - Fork 636
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Tokio migration] Make RodioSink Send and other improvements #601
[Tokio migration] Make RodioSink Send and other improvements #601
Conversation
|
||
list_formats(&default_device); | ||
|
||
println!("Other Available Audio Devices:"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was println!
before, but would this not make more sense to be info!
? Like in general have no println!
in the lib because it can not be filtered?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just executed in the case someone specifies "?" as device name and explicitly wishes to see the available devices.
Firstly, fe37186 added the restriction that `Sink`s must be `Send`. It turned out later that this restrictions was unnecessary, and since some `Sink`s aren't `Send` yet, this restriction is lifted again. librespot-org#601 refactored the `RodioSink` in order to make it `Send`. These changes are partly reverted in favour of the initial simpler design. There were also some compile errors in the gstreamer backend which are hereby solved.
fe37186 added the restriction that `Sink`s must be `Send`. It turned out later that this restrictions was unnecessary, and since some `Sink`s aren't `Send` yet, this restriction is lifted again. librespot-org#601 refactored the `RodioSink` in order to make it `Send`. These changes are partly reverted in favour of the initial simpler design. Furthermore, there were some compile errors in the gstreamer backend which are hereby fixed.
fe37186 added the restriction that `Sink`s must be `Send`. It turned out later that this restrictions was unnecessary, and since some `Sink`s aren't `Send` yet, this restriction is lifted again. librespot-org#601 refactored the `RodioSink` in order to make it `Send`. These changes are partly reverted in favour of the initial simpler design. Furthermore, there were some compile errors in the gstreamer backend which are hereby fixed.
fe37186 added the restriction that `Sink`s must be `Send`. It turned out later that this restrictions was unnecessary, and since some `Sink`s aren't `Send` yet, this restriction is lifted again. librespot-org#601 refactored the `RodioSink` in order to make it `Send`. These changes are partly reverted in favour of the initial simpler design. Furthermore, there were some compile errors in the gstreamer backend which are hereby fixed.
fe37186 added the restriction that `Sink`s must be `Send`. It turned out later that this restrictions was unnecessary, and since some `Sink`s aren't `Send` yet, this restriction is lifted again. librespot-org#601 refactored the `RodioSink` in order to make it `Send`. These changes are partly reverted in favour of the initial simpler design. Furthermore, there were some compile errors in the gstreamer backend which are hereby fixed.
fe37186 added the restriction that `Sink`s must be `Send`. It turned out later that this restrictions was unnecessary, and since some `Sink`s aren't `Send` yet, this restriction is lifted again. librespot-org#601 refactored the `RodioSink` in order to make it `Send`. These changes are partly reverted in favour of the initial simpler design. Furthermore, there were some compile errors in the gstreamer backend which are hereby fixed.
fe37186 added the restriction that `Sink`s must be `Send`. It turned out later that this restrictions was unnecessary, and since some `Sink`s aren't `Send` yet, this restriction is lifted again. librespot-org#601 refactored the `RodioSink` in order to make it `Send`. These changes are partly reverted in favour of the initial simpler design. Furthermore, there were some compile errors in the gstreamer backend which are hereby fixed.
Firstly, this PR fixes two bugs in the playback crate (well, I also introduced them).
Secondly,
RodioSink
was modified such that it implementsSend
now. The solution spawns an own thread to create therodio::OutputStream
. WhenRodioSink
is dropped, this thread is notified via a channel and theOutputStream
is dropped as well. SoRodioSink
doesn't carry theOutputStream
anymore and is nowSend
.I also used this occasion to improve the error handling in the
RodioSink
usingthiserror
, 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.