v0.59.0: LinTunes' own AirPlay 1 sender for third-party speakers
pyatv's handshakes play nothing on a WiiM; Music Assistant's cliairplay plays on it through libraop's RAOP client. airplay/raop.py reproduces that client's behaviour on the wire: one RTSP session with auth-setup, an AppleLossless ANNOUNCE and RECORD carrying RTP-Info, OPTIONS keepalives, a 2 s buffer, NTP-locked timestamps, a start that sends the first two seconds at once, the timing responder and resends. Non-Apple speakers stream through it; pyatv only finds them. Verified against shairport-sync (decoded tone, flush on pause/seek, volume, metadata). Round 88's pyatv compat hooks are gone.
This commit is contained in:
@@ -855,24 +855,34 @@ persistence) → GUI (Qt widgets that read the manager and connect to its signal
|
||||
session (picked for any receiver advertising AirPlay 2 features) gets 200
|
||||
OK for everything, timing included, and stays silent; its AirPlay 1 runs a
|
||||
transient pairing and then sends the ANNOUNCE unencrypted, and the WiiM
|
||||
hangs up. Third-party speakers take what cliraop/owntones send, so
|
||||
`stream.install_shim` also hooks pyatv for hosts marked by `set_compat`:
|
||||
auth-setup whatever the model, no pairing, and ALAC — `AppleLossless` in
|
||||
the SDP, each packet an uncompressed ALAC frame (`support.alac_verbatim`,
|
||||
byte-identical to ffmpeg's encoder on incompressible input). The handshake
|
||||
was verified silently (all-zero audio) against tiat.place. `use_compat`:
|
||||
config.json's `airplay_protocol` "auto" = compat for everything but
|
||||
Apple's own hardware (a HomePod is AirPlay 2 only), "1" = compat
|
||||
everywhere, "2" = pyatv's AirPlay 2. `airplay_debug` puts pyatv's logger at
|
||||
DEBUG; every stream's start, first audio and outcome are logged at INFO
|
||||
under `lintunes.airplay`, and the chosen protocol in the control log.
|
||||
hangs up. Music Assistant's `cliairplay` plays on it through libraop's
|
||||
RAOP client (its "RAOP-compat" route), so since Round 90 **`raop.py` is
|
||||
LinTunes' own RAOP sender** reproducing that client's behaviour, and
|
||||
pyatv only discovers those speakers: one RTSP session per connection
|
||||
(auth-setup when `et` lists 4, ANNOUNCE AppleLossless, SETUP, RECORD with
|
||||
`RTP-Info`, no FLUSH before audio; OPTIONS keepalive every 25 s; FLUSH +
|
||||
restart for pause/seek/next), the iTunes User-Agent, a **2 s** buffer
|
||||
(pyatv's is 1.5 s; cliairplay's notes say LinkPlay starves on shallow
|
||||
ones), RTP timestamps on the NTP clock, a start 200 ms out so the first
|
||||
~2 s go out at once, the timing responder, resends from a 512-packet
|
||||
backlog. `NativeDevice` is the slice of a pyatv device `AirPlaySink`
|
||||
drives, so the sink is shared. Audio is **uncompressed** ALAC
|
||||
(`support.alac_verbatim`) where libraop compresses: ffmpeg's encoder only
|
||||
writes 4096-sample frames (RAOP needs 352), and Rice coding in Python
|
||||
would cost the GUI's interpreter a share of a core. Not yet confirmed on
|
||||
the WiiM. `use_compat`: config.json's `airplay_protocol` "auto" = the
|
||||
native sender for everything but Apple's own hardware (a HomePod is
|
||||
AirPlay 2 only), "1" = native everywhere, "2" = pyatv's AirPlay 2;
|
||||
`airplay_latency_ms` overrides the 2 s. `airplay_debug` puts pyatv's and
|
||||
`lintunes.airplay.raop`'s loggers at DEBUG (every RTSP request); every
|
||||
stream's start, first audio and outcome are logged at INFO under
|
||||
`lintunes.airplay`, and the chosen sender in the control log.
|
||||
**Testing without a speaker** (Round 89): shairport-sync in Docker
|
||||
(`mikebrady/shairport-sync:5.5.2-classic`, its own dbus + avahi inside,
|
||||
on the default bridge so nothing is advertised on the LAN, `-o stdout`
|
||||
to a file) is a real third-party receiver whose decoded PCM can be
|
||||
compared with what was sent — silent and bit-checkable. LinTunes' stream
|
||||
decodes there; the WiiM still plays nothing from pyatv, though
|
||||
Music Assistant's `cliairplay` binary plays on it. pyatv also died on
|
||||
compared with what was sent — silent and bit-checkable (its output file
|
||||
also holds the silence it writes while idle). pyatv also died on
|
||||
shairport's `/info` (not a plist), so the shim treats an unreadable
|
||||
`/info` as none.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user