Two sendspin clients are unable to play simultaneously in dual mono setup

Open
#201 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
python

Research direction

Reproduce the dual-mono setup with Sendspin 5.9.0 and MA 2.8.1, starting playback on both clients. Trace aiosendspin.client.client.py at _handle_audio_chunk and sendspin.audio_connector.py at AudioStreamHandler._on_audio_chunk, then verify both clients can play simultaneously without the audio-worker or output-device errors.

Written by the indexing model from the issue text.

Description

With Sendspin 5.9.0 and MA 2.8.1 both Sendspin clients are able to start as long as no music is playing. When starting playback and linking clients, slave throws:

ERROR:aiosendspin.client.client:Error in audio chunk callback <bound method AudioStreamHandler._on_audio_chunk of <sendspin.audio_connector.AudioStreamHandler object at 0x7f8d2bb770>>
Traceback (most recent call last):
File "/var/lib/sendspin-olohuone/.local/share/uv/tools/sendspin/lib/python3.13/site-packages/aiosendspin/client/client.py", line 876, in _handle_audio_chunk
callback(timestamp_us, payload, self._current_audio_format)
~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/var/lib/sendspin-olohuone/.local/share/uv/tools/sendspin/lib/python3.13/site-packages/sendspin/audio_connector.py", line 451, in _on_audio_chunk
raise RuntimeError("Audio worker is not running")
RuntimeError: Audio worker is not running

Then for as long as the other sendspin instance is running, the crashed instance is unable to start and throws:

Error: No output device matching 'olohuone'

When restarting both instances, both are again able to start.

So either one can be used to play music, but not simultaneously.

Originally posted by @rvk in #58

Dominant language
Python
Stars
190
Forks
36
Avg merge
11d 19h
Merged PRs (30d)
2

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Sendspin/sendspin-python-cli

All issues in Sendspin/sendspin-python-cli

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.