mirror of
https://github.com/jpochyla/psst.git
synced 2026-04-27 15:35:56 +03:00
[PR #197] [MERGED] Switch to CPAL, Symphonia, and parking_lot #450
Labels
No labels
api
bug
build
documentation
duplicate
enhancement
good first issue
help wanted
idea
invalid
linux
lowprio
macos
pull-request
upstream
windows
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/psst#450
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/jpochyla/psst/pull/197
Author: @jpochyla
Created: 10/14/2021
Status: ✅ Merged
Merged: 11/16/2021
Merged by: @jpochyla
Base:
master← Head:cpal-symphonia📝 Commits (10+)
50a222acore: Switch to CPAL, Symphonia, and parking_lotb2dd91dcore: Add experimental resampling42da6b6core: Apply global volume and norm factor0092404core: Huge mod reorgea1a6ccUpdate ureqc0abb27Remove minivorbis7dceae0core: Rework the audio buffering pipeline583e4e6core: Add resampling to the new Workerb689920core: Fix reporting rate calculation8220990Nit📊 Changes
48 files changed (+2435 additions, -3520 deletions)
View changed files
📝
.github/workflows/build.yml(+1 -1)➖
.gitmodules(+0 -3)📝
Cargo.lock(+576 -32)📝
Cargo.toml(+6 -3)➖
minivorbis-sys/Cargo.toml(+0 -8)➖
minivorbis-sys/bindings.h(+0 -3)➖
minivorbis-sys/build.rs(+0 -10)➖
minivorbis-sys/gen.sh(+0 -10)➖
minivorbis-sys/minivorbis(+0 -1)➖
minivorbis-sys/minivorbis.c(+0 -6)➖
minivorbis-sys/src/bindings.rs(+0 -1919)➖
minivorbis-sys/src/lib.rs(+0 -8)➖
minivorbis/Cargo.toml(+0 -8)➖
minivorbis/src/lib.rs(+0 -272)📝
psst-cli/src/main.rs(+6 -18)📝
psst-core/Cargo.toml(+7 -4)➕
psst-core/src/actor.rs(+118 -0)➕
psst-core/src/audio/decode.rs(+115 -0)📝
psst-core/src/audio/decrypt.rs(+10 -3)➕
psst-core/src/audio/mod.rs(+6 -0)...and 28 more files
📄 Description
This is an experimental effort in replacing
miniaudioandminivorbiscrates withcpalfor the raw audio output andsymphoniafor decoding. This has a few benefits:miniaudio-sysbindings for different platforms....and also a few drawbacks:
cpaldoesn't do any resampling. Some Windows setups seem to require apps to resample the audio themselves, but so far, the Spotify OGG tracks seem to all be sampled at 41000hz. I suppose that maybe we can assume all audio setups would support this and wait? @H-M-H has integrateddaspwithcpalfor resampling support: https://github.com/jpochyla/psst/discussions/167While refactoring this, I've also replaced
stdmutexes withparking_lot, introduced a ringbuffer between the audio thread and the decoding, and split decoding of different audio files into different threads, to avoid deadlocks in case the I/O gets stuck indefinitely.Missing:
f32is supported)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.