|
YAACC - UPNP Client and Server
|
DRAFT of task 4.1: the Media3 processors that turn what ExoPlayer decodes into the format of the Snapcast stream and hand it to a PcmSink.
More...

Static Public Member Functions | |
| static AudioProcessor[] | create (PcmFormat target, PcmSink sink, boolean playLocally) |
| A new chain (the processors keep state: one chain per player). | |
DRAFT of task 4.1: the Media3 processors that turn what ExoPlayer decodes into the format of the Snapcast stream and hand it to a PcmSink.
Not wired into the player: task 4.4 waits for the owner's device.
The order matters:
ToInt16PcmAudioProcessor (Media3): 8, 24, 32 bit and float to 16 bit. It is inactive for 16 bit. SonicAudioProcessor (Media3) with setOutputSampleRateHz: the sample rate, which is not written by hand. It accepts 16 bit and float only, hence the step before it, and is inactive when the rate matches. PcmTapAudioProcessor: folds the channels to stereo and hands the PCM over. The Media3 ChannelMixingAudioProcessor is not used for the channels: its constant-power matrices exist for 1 to 6 channels only and it keeps a SparseArray, so it can not be tested on the JVM; PcmFormatConverter handles 1 to 8 channels with a documented, tested fold-down.
Use: new DefaultAudioSink.Builder(context).setAudioProcessors(FeedTapChain.create(...)).build() from the buildAudioSink of a DefaultRenderersFactory. Where in ExoPlayer's own pipeline these processors sit (before or after its channel mapping and trimming) is one of the questions of the device, see "Snapcast feed
tap (draft)" in docs/tech.md.
|
static |
A new chain (the processors keep state: one chain per player).
| target | the format of the stream, rate included |
| sink | receives the PCM |
| playLocally | false to mute the phone's own speaker |
Referenced by de.yaacc.player.SendspinPlayer.createExoPlayer(), de.yaacc.player.SendspinSourcePlayer.createExoPlayer(), and de.yaacc.player.SnapcastPlayer.createExoPlayer().
