[PR #820] [MERGED] Implement common SinkError and SinkResult #1099

Closed
opened 2026-02-27 20:01:09 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/librespot-org/librespot/pull/820
Author: @JasonLG1979
Created: 7/6/2021
Status: Merged
Merged: 9/27/2021
Merged by: @roderickvd

Base: devHead: alsa-errors-round-two


📝 Commits (8)

  • 0e3ea3a More Errors and code cleanup
  • 37d9fd4 Implement SinkError
  • 970c621 Make error messages more consistent and concise
  • 7977531 Implement SinkResult
  • 24b9e1d Merge branch 'dev' into alsa-errors-round-two
  • 88c7dbb Merge branch 'dev' into alsa-errors-round-two
  • d2e3ac0 Fix branch conflicts
  • a44042c Handle ALSA backend buffer sizing a little better.

📊 Changes

10 files changed (+280 additions, -225 deletions)

View changed files

📝 playback/src/audio_backend/alsa.rs (+104 -97)
📝 playback/src/audio_backend/gstreamer.rs (+3 -3)
📝 playback/src/audio_backend/jackaudio.rs (+4 -4)
📝 playback/src/audio_backend/mod.rs (+20 -6)
📝 playback/src/audio_backend/pipe.rs (+11 -7)
📝 playback/src/audio_backend/portaudio.rs (+5 -6)
📝 playback/src/audio_backend/pulseaudio.rs (+77 -71)
📝 playback/src/audio_backend/rodio.rs (+23 -9)
📝 playback/src/audio_backend/sdl.rs (+6 -6)
📝 playback/src/audio_backend/subprocess.rs (+27 -16)

📄 Description

  • Implement common SinkError and SinkResult for use with all backends.

  • impl From<AlsaError> for SinkError so AlsaErrors can be thrown to player as SinkErrors.

  • impl From<PulseError> for PulseError so PulseErrors can be thrown to player as SinkErrors.

  • Other backends can follow the same pattern as the alsa and pulseaudio backends for detailed errors in the future if someone wishes to implement them.

  • A little code clean up and added blank lines to make it easier to read at a glance.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/librespot-org/librespot/pull/820 **Author:** [@JasonLG1979](https://github.com/JasonLG1979) **Created:** 7/6/2021 **Status:** ✅ Merged **Merged:** 9/27/2021 **Merged by:** [@roderickvd](https://github.com/roderickvd) **Base:** `dev` ← **Head:** `alsa-errors-round-two` --- ### 📝 Commits (8) - [`0e3ea3a`](https://github.com/librespot-org/librespot/commit/0e3ea3af611ab54bff89da5235092c1f02d373d3) More Errors and code cleanup - [`37d9fd4`](https://github.com/librespot-org/librespot/commit/37d9fd4c94f0fe9c9c770d2c9ccfdf7fbf5371b8) Implement SinkError - [`970c621`](https://github.com/librespot-org/librespot/commit/970c621e02c22af1245ab426c9d0e3de30642508) Make error messages more consistent and concise - [`7977531`](https://github.com/librespot-org/librespot/commit/797753179fe5e135341cf3a25e6500ee297e92c4) Implement SinkResult - [`24b9e1d`](https://github.com/librespot-org/librespot/commit/24b9e1d5f7b710ff8ec3851b12e7416ed7a97f8c) Merge branch 'dev' into alsa-errors-round-two - [`88c7dbb`](https://github.com/librespot-org/librespot/commit/88c7dbb4bd7e00fcb32320cf7f94532b703e7318) Merge branch 'dev' into alsa-errors-round-two - [`d2e3ac0`](https://github.com/librespot-org/librespot/commit/d2e3ac079faa564adc417e6b1b0eeca9cac33304) Fix branch conflicts - [`a44042c`](https://github.com/librespot-org/librespot/commit/a44042cf6723dd90657dc82273fce3f0de6ca8d9) Handle ALSA backend buffer sizing a little better. ### 📊 Changes **10 files changed** (+280 additions, -225 deletions) <details> <summary>View changed files</summary> 📝 `playback/src/audio_backend/alsa.rs` (+104 -97) 📝 `playback/src/audio_backend/gstreamer.rs` (+3 -3) 📝 `playback/src/audio_backend/jackaudio.rs` (+4 -4) 📝 `playback/src/audio_backend/mod.rs` (+20 -6) 📝 `playback/src/audio_backend/pipe.rs` (+11 -7) 📝 `playback/src/audio_backend/portaudio.rs` (+5 -6) 📝 `playback/src/audio_backend/pulseaudio.rs` (+77 -71) 📝 `playback/src/audio_backend/rodio.rs` (+23 -9) 📝 `playback/src/audio_backend/sdl.rs` (+6 -6) 📝 `playback/src/audio_backend/subprocess.rs` (+27 -16) </details> ### 📄 Description * Implement common `SinkError` and `SinkResult` for use with all backends. * `impl From<AlsaError> for SinkError` so `AlsaError`s can be thrown to `player` as `SinkError`s. * `impl From<PulseError> for PulseError` so `PulseError`s can be thrown to `player` as `SinkError`s. * Other backends can follow the same pattern as the alsa and pulseaudio backends for detailed errors in the future if someone wishes to implement them. * A little code clean up and added blank lines to make it easier to read at a glance. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 20:01:09 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/librespot#1099
No description provided.