[PR #801] [MERGED] Better errors in PulseAudio backend #1087

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

📋 Pull Request Information

Original PR: https://github.com/librespot-org/librespot/pull/801
Author: @JasonLG1979
Created: 6/18/2021
Status: Merged
Merged: 6/30/2021
Merged by: @roderickvd

Base: devHead: fix_pulseaudio_backend


📝 Commits (10+)

  • 6d373c1 Fix PulseAudio backend
  • 79c4db7 Merge branch 'librespot-org:dev' into fix_pulseaudio_backend
  • 8c37afe Various fixes addressing review comments and use drain in stop
  • 86f5bb2 Merge branch 'librespot-org:dev' into fix_pulseaudio_backend
  • c9d912f update change log
  • e86dd37 Use thiserror for erros in pulsaudio backend
  • f915e28 Simplify errors a bit
  • 6e58d79 Merge branch 'librespot-org:dev' into fix_pulseaudio_backend
  • e832dc8 address review comments
  • 6024ad9 Merge branch 'librespot-org:dev' into fix_pulseaudio_backend

📊 Changes

3 files changed (+81 additions, -51 deletions)

View changed files

📝 CHANGELOG.md (+1 -1)
📝 playback/Cargo.toml (+1 -1)
📝 playback/src/audio_backend/pulseaudio.rs (+79 -49)

📄 Description

  • Use F32 if a user requests F64 (F64 is not supported by PulseAudio)
  • Move all code that can fail to start where errors can be returned to prevent a panic!
  • Remove unneeded unwraps.

Combined with the ability to gracefully exit on error player in https://github.com/librespot-org/librespot/pull/797 this should about do it for for the whole "never panic!" idea as far as the PulseAudio backend is concerned.


🔄 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/801 **Author:** [@JasonLG1979](https://github.com/JasonLG1979) **Created:** 6/18/2021 **Status:** ✅ Merged **Merged:** 6/30/2021 **Merged by:** [@roderickvd](https://github.com/roderickvd) **Base:** `dev` ← **Head:** `fix_pulseaudio_backend` --- ### 📝 Commits (10+) - [`6d373c1`](https://github.com/librespot-org/librespot/commit/6d373c1339374bd82f8477dc175a141b086c19a7) Fix PulseAudio backend - [`79c4db7`](https://github.com/librespot-org/librespot/commit/79c4db77e5c85e501704c894da487b0dcad8da6b) Merge branch 'librespot-org:dev' into fix_pulseaudio_backend - [`8c37afe`](https://github.com/librespot-org/librespot/commit/8c37afe32199df521058b31bab5002ef52a2f84a) Various fixes addressing review comments and use drain in stop - [`86f5bb2`](https://github.com/librespot-org/librespot/commit/86f5bb2c37abebeb4705f1343d860b814418a1a1) Merge branch 'librespot-org:dev' into fix_pulseaudio_backend - [`c9d912f`](https://github.com/librespot-org/librespot/commit/c9d912f498e8cd2e7396d92f8fd2ea4d46f7f7bc) update change log - [`e86dd37`](https://github.com/librespot-org/librespot/commit/e86dd37ad5f4202e172cd906db01817a40679957) Use thiserror for erros in pulsaudio backend - [`f915e28`](https://github.com/librespot-org/librespot/commit/f915e2813868c6a7f6bc37afd2dad62edec130c9) Simplify errors a bit - [`6e58d79`](https://github.com/librespot-org/librespot/commit/6e58d798584fe2c8470d1afe6a3566e89644c4dd) Merge branch 'librespot-org:dev' into fix_pulseaudio_backend - [`e832dc8`](https://github.com/librespot-org/librespot/commit/e832dc86a503251ef2e37372062ae499caf52726) address review comments - [`6024ad9`](https://github.com/librespot-org/librespot/commit/6024ad96256c80a77fc010648bed2ecee65cd093) Merge branch 'librespot-org:dev' into fix_pulseaudio_backend ### 📊 Changes **3 files changed** (+81 additions, -51 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -1) 📝 `playback/Cargo.toml` (+1 -1) 📝 `playback/src/audio_backend/pulseaudio.rs` (+79 -49) </details> ### 📄 Description * Use F32 if a user requests F64 (F64 is not supported by PulseAudio) * Move all code that can fail to `start` where errors can be returned to prevent a panic! * Remove unneeded unwraps. Combined with the ability to gracefully exit on error player in https://github.com/librespot-org/librespot/pull/797 this should about do it for for the whole "never panic!" idea as far as the PulseAudio backend is concerned. --- <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:06 +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#1087
No description provided.