Skip to content

feat(source): add source@v1 cli#123

Open
rudyberends wants to merge 2 commits intoSendspin:mainfrom
rudyberends:source-v1-reference-impl
Open

feat(source): add source@v1 cli#123
rudyberends wants to merge 2 commits intoSendspin:mainfrom
rudyberends:source-v1-reference-impl

Conversation

@rudyberends
Copy link
Copy Markdown

This PR adds a source@v1 reference implementation to sendspin-cli.

You can now run source input in two modes:

  • sendspin source run (source-only client)
  • sendspin daemon --source (player + source in one process)

The implementation supports line-in capture and synthetic sine input, source state reporting, source start/stop control, optional source control hooks, and reconnect behavior aligned with daemon operation.

What’s included

  • Added shared source runtime modules:
    • sendspin/source_stream.py
    • sendspin/source_utils.py
  • Extended CLI:
    • new source run command
    • daemon source flags (--source-*)
    • input device listing (--list-input-devices)
  • Integrated source role into daemon mode:
    • advertises source@v1 support in hello when enabled
    • handles source commands and input stream format requests
    • uses the same source streaming path as source run
  • Added persistent daemon settings for source options and source hooks
  • Updated README with source usage, options, and examples

Notes

  • Source control hooks are optional:
    • --source-hook-play
    • --source-hook-pause
    • --source-hook-next
    • --source-hook-previous
    • --source-hook-activate
    • --source-hook-deactivate
  • Sine input is intended as a lightweight test/debug path when no capture device is available.

@balloob
Copy link
Copy Markdown
Contributor

balloob commented Feb 16, 2026

Hey, thanks for the PR!

Quick review: See some inline imports still hanging around.

We still need to finalize the source spec, but when we do this will be a great addition!

Are you hanging out in the sendspin channels on the Music Assistant discord?

@rudyberends
Copy link
Copy Markdown
Author

Thanks for the feedback. I removed the remaining inline imports in daemon.py and moved them to module-level imports in commit 61938c8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants