|
YAACC - UPNP Client and Server
|
An audio sink that never takes a compressed format, so that ExoPlayer decodes every track to PCM and the audio goes through the processors of the tap (FeedTapChain).
More...


Public Member Functions | |
| PcmOnlyAudioSink (AudioSink sink) | |
| boolean | supportsFormat (Format format) |
| int | getFormatSupport (Format format) |
| AudioOffloadSupport | getFormatOffloadSupport (Format format) |
An audio sink that never takes a compressed format, so that ExoPlayer decodes every track to PCM and the audio goes through the processors of the tap (FeedTapChain).
Why. For a compressed format (AC-3, E-AC-3, DTS, TrueHD, ...) the DefaultAudioSink asks the audio capabilities of the output the phone is connected to; if HDMI, USB or Bluetooth reports that it plays the format directly, the track is passed through undecoded on a path with no processors at all: the group would hear nothing while the phone's own output plays the track. In Media3 1.11.1 these capabilities can not be fixed on the DefaultAudioSink.Builder: setAudioCapabilities counts only for the deprecated builder without a context; with a context (javap -c of DefaultAudioSink.build) the builder hands null to the output provider, which registers an AudioCapabilitiesReceiver and uses the device's real capabilities. So the sink itself answers "not supported" for anything that is not raw PCM; the renderer then chooses a decoder (as it does on a plain phone speaker) and offers the decoded PCM, which is delegated. Offload is refused the same way (it is a compressed path as well).