YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
de.yaacc.multiroom.feed.PcmSink Interface Reference

Where decoded PCM goes: the PcmFeeder, or a fake in a test. More...

Inheritance diagram for de.yaacc.multiroom.feed.PcmSink:
Inheritance graph
Collaboration diagram for de.yaacc.multiroom.feed.PcmSink:
Collaboration graph

Public Member Functions

boolean write (byte[] data, int offset, int length)
 Hands over PCM.
 
void discard ()
 The audio handed over so far is stale (a seek, a stop, a flush of the player): drop what is waiting.
 

Detailed Description

Where decoded PCM goes: the PcmFeeder, or a fake in a test.

The bytes are raw little-endian PCM in the format of the feed (for a Snapcast stream 48000 Hz, 16 bit, stereo).

Member Function Documentation

◆ discard()

void de.yaacc.multiroom.feed.PcmSink.discard ( )

The audio handed over so far is stale (a seek, a stop, a flush of the player): drop what is waiting.

Implemented in de.yaacc.sendspin.hub.PcmStreamer, de.yaacc.snapcast.feed.PcmFeeder, and de.yaacc.snapcast.feed.PcmFeederOutput.

Referenced by de.yaacc.snapcast.feed.SnapcastFeedController.pause().

Here is the caller graph for this function:

◆ write()

boolean de.yaacc.multiroom.feed.PcmSink.write ( byte[] data,
int offset,
int length )

Hands over PCM.

May wait for a short, bounded time when the sink is full (back pressure); never grows without limit. The data is copied before this returns.

Returns
false if the sink is closed or failed, or if (a part of) the data had to be dropped because the sink stayed full

Implemented in de.yaacc.sendspin.hub.PcmStreamer, de.yaacc.snapcast.feed.PcmFeeder, and de.yaacc.snapcast.feed.PcmFeederOutput.


The documentation for this interface was generated from the following file: