Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support output to a named pipe in Jukebox mode (like mpd) for the purpose of feeding the output to snapcast #164

Closed
danhansen opened this issue Oct 20, 2021 · 1 comment

Comments

@danhansen
Copy link

It would be great to have an option for gonic to output to a named pipe for the purpose of feeding snapcast. This is more of a "nice-to-have", given that the same result can more or less already be achieved with the snd-aloop kernel module or the module-pipe-sink pulseaudio module. However, those solutions have more moving parts/dependencies, which makes them less ideal for things like docker deployment. The named pipe approach is very self-contained.

Here is an example of how that can be configured between snapcast and mpd today:

https://github.com/badaix/snapcast/blob/master/doc/player_setup.md#mpd

The implementation appears to be more or less as simple as invoking fwrite to write the contents of the audio buffer to the named pipe:

https://github.com/MusicPlayerDaemon/MPD/blob/master/src/output/plugins/PipeOutputPlugin.cxx

If I find some spare time, I may take a stab at an implementation.

sentriz added a commit that referenced this issue Apr 13, 2022
sentriz added a commit that referenced this issue Apr 13, 2022
sentriz added a commit that referenced this issue Apr 21, 2022
sentriz added a commit that referenced this issue Nov 2, 2022
sentriz added a commit that referenced this issue Nov 2, 2022
sentriz added a commit that referenced this issue Nov 3, 2022
sentriz added a commit that referenced this issue Nov 9, 2022
sentriz added a commit that referenced this issue Nov 9, 2022
sentriz added a commit that referenced this issue Nov 9, 2022
sentriz added a commit that referenced this issue Nov 9, 2022
sentriz added a commit that referenced this issue Nov 9, 2022
sentriz added a commit that referenced this issue Nov 10, 2022
sentriz added a commit that referenced this issue Nov 10, 2022
@sentriz
Copy link
Owner

sentriz commented Nov 13, 2022

@danhansen it's looking like i'm going to update jukebox mode to use mpv and talk to over IPC

(then we get less resource usage, gapless playback, support for more file formats, removal of a few dependencies that are giving me trouble at the moment)

in that case, how about we support some new gonic option like -jukebox-mode-mpv-extra-args, to which you could supply --ao=pcm --ao-pcm-file=path/to/my-pipe ?

https://github.com/badaix/snapcast/blob/master/doc/player_setup.md#mpv

@sentriz sentriz added this to the next release milestone Nov 15, 2022
sentriz added a commit that referenced this issue Nov 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants