mirror of
https://github.com/devgianlu/go-librespot.git
synced 2026-04-25 21:05:47 +03:00
[PR #118] [CLOSED] [WIP] feat: use native Go package for decoding Ogg Vorbis audio #220
Labels
No labels
bug
enhancement
pull-request
spotify-side
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/go-librespot#220
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/devgianlu/go-librespot/pull/118
Author: @aykevl
Created: 10/6/2024
Status: ❌ Closed
Base:
master← Head:vorbis-purego📝 Commits (1)
6068dd4feat: use native Go package for decoding Ogg Vorbis audio📊 Changes
7 files changed (+83 additions, -401 deletions)
View changed files
📝
.github/workflows/build_test.yml(+1 -1)📝
.github/workflows/release.yml(+0 -28)📝
README.md(+1 -3)📝
audio/metadata.go(+40 -34)📝
go.mod(+2 -1)📝
go.sum(+4 -2)📝
vorbis/decoder.go(+35 -332)📄 Description
This is something I'm experimenting with. It's nowhere near finished, though it does work. The main thing that's missing is seek indices (which makes seeking a bit slower than it could be).
Advantages:
I did some benchmarking, to see whether using a native Go version would perhaps be faster than using libvorbis through cgo because of the CGo call overhead. What I found was that the native version is a lot slower, but not for the reason you might think: the audio decryptor actually becomes twice as slow while the decoder itself is only about 8% slower. So what I'm suspecting is that the new decoder does a lot of unnecessary seeking or reads more data than it actually needs.
I wanted to share this as an experiment. Maybe I'll continue working on it to see whether I can fix the decryptor slowdowns and of course to implement seeking.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.