Update Resonate provider with `MULTI_DEVICE_DSP` support and other improvements ...
authorMaxim Raznatovski <nda.mr43@gmail.com>
Fri, 14 Nov 2025 15:02:16 +0000 (16:02 +0100)
committerGitHub <noreply@github.com>
Fri, 14 Nov 2025 15:02:16 +0000 (10:02 -0500)
commit9ec2a9f5ff198bbbc2b94db02982d7dcab30b1c2
treea76c8bee2579aa309b9d0287153ba8290d308d62
parent12d152d064225bfb47ddcf97104d562bec873603
Update Resonate provider with `MULTI_DEVICE_DSP` support and other improvements (#2616)

* Update `MediaStream` usage

* Support `MULTI_DEVICE_DSP` for resonate

* Rename `stream` to `channel` in `MediaStream`

* Initial working implementation for per player DSP support

* Refactors, fixes, and comments

* Rename `shared_buffer` to `chunk_buffer`

* Use `UUID` instead of `str`

* Use seconds in `multi_client_stream`

* Move attribute definitions to class level

* Remove dead code

* Refactor `_cleanup_old_chunks`

* Rename `MultiClientStream` to `TimedClientStream`

* Refactor `_read_chunk_from`

* Convert main channel to 16-bit PCM for aioresonate compatibility

* Use separate host and advertise_host

Pass bind_ip for socket binding and publish_ip for mDNS advertising to
correctly handle scenarios where the server binds to all interfaces
(0.0.0.0) but advertises a specific IP address to clients.

* Bump `aioresonate`

* Add safety check to `TimedClientStream` to avoid memory leaks

* Update `MIN_BUFFER_DURATION` comment with findings

* Update music_assistant/providers/resonate/timed_client_stream.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Clean up `timed_client_stream` reference after playback

* Bump `aioresonate`

* Update call to the now async friendly `set_media_art`

* Update `playback_state` when joining a new group

* Update `group_members` based on `aioresonate` events

Instead of optimistically setting them.

* Move `MusicAssistantMediaStream` outside a method

* Run audio cleanup immediately

* Remove redundant type annotation

* Use `anext()`

* Remove unused async from `_cleanup_old_chunks`

* Simplify method name and clarify lock requirement

* Move `_generate` to class-level method

* Refactor `MusicAssistantMediaStream` parameters

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
music_assistant/providers/resonate/manifest.json
music_assistant/providers/resonate/player.py
music_assistant/providers/resonate/provider.py
music_assistant/providers/resonate/timed_client_stream.py [new file with mode: 0644]
requirements_all.txt