mirror of
https://github.com/devgianlu/go-librespot.git
synced 2026-04-26 05:15:49 +03:00
[PR #153] [MERGED] Add support for Audio Toolbox output (MacOS) #234
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#234
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/153
Author: @stronk-dev
Created: 12/10/2024
Status: ✅ Merged
Merged: 7/12/2025
Merged by: @devgianlu
Base:
master← Head:feature/AudioToolbox📝 Commits (10+)
6684e3emacosfbff003initial proof of conceptd8b96f4rename to reflect technology usedbdeb4e0volume control and delayf334cecimplement coreaudio latencydf88de2close some memory leaks4dab982Rename audio toolbox outputebfe7c7Refactor & fixes for Mac support30b7a20Remove ring buffer alltogether70cc116Setout.err📊 Changes
5 files changed (+283 additions, -1 deletions)
View changed files
📝
README.md(+1 -1)➕
output/driver-alsa-stub.go(+11 -0)➕
output/driver-audio-toolbox-stub.go(+11 -0)➕
output/driver-audio-toolbox.go(+254 -0)📝
output/output.go(+6 -0)📄 Description
Adapted from https://github.com/devgianlu/go-librespot/pull/59
Notable changes:
newOutput, make it a separatetoolboxOutputwhich can be activated by setting the backend toaudio-toolbox.go:buildconstraint printing a generic 'unsupported' messageNOTE: we could enhance the stubs so that the output knows which outputs are supported and then automatically choose a platform-specific output like
audio-toolbox.NOTE: depending on how the float32 reader is implemented, maybe having a FIFO buffer in the output could be useful? Ideally these kinds of callbacks have instant access to data without blockage (and fill remaining samples with silence if there's no data in the buffer).
Removing the local buffer in the output and having the CB read directly does not seem to cause any issues so far...
The PR is pronbably ready for review as-is, but there might be some minor issues like making sure that
out.errgets set where necessary, more comments and testing to see how it handles error cases.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.