YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
de.yaacc.multiroom.codec.PcmFrameDecoder Class Reference

The decoder of the pcm codec: the payload is raw samples in the format of the (validated) WAVE header. More...

Inheritance diagram for de.yaacc.multiroom.codec.PcmFrameDecoder:
Inheritance graph
Collaboration diagram for de.yaacc.multiroom.codec.PcmFrameDecoder:
Collaboration graph

Public Member Functions

 PcmFrameDecoder (WaveFormat format, int maxFramesPerChunk)
 
byte[] decode (byte[] payload) throws DecoderException
 
void reset ()
 Forgets partial state (after a lost connection): the next chunk starts a fresh stream.
 
long droppedPartialBytes ()
 Bytes of incomplete frames thrown away so far (statistics).
 
void close ()
 Frees the decoder.
 
- Public Member Functions inherited from de.yaacc.multiroom.codec.FrameDecoder

Detailed Description

The decoder of the pcm codec: the payload is raw samples in the format of the (validated) WAVE header.

A trailing partial frame is dropped (counted), nothing is sized from the payload except through the validated frame size and the frame limit, and samples of more than 16 bit are converted.

Member Function Documentation

◆ close()

void de.yaacc.multiroom.codec.PcmFrameDecoder.close ( )

Frees the decoder.

Safe to call twice.

Implements de.yaacc.multiroom.codec.FrameDecoder.

◆ decode()

byte[] de.yaacc.multiroom.codec.PcmFrameDecoder.decode ( byte[] payload) throws DecoderException
Returns
whole frames of PCM; empty when the chunk holds no complete audio yet
Exceptions
DecoderExceptionwhen the chunk can not be decoded; the caller drops the chunk

Implements de.yaacc.multiroom.codec.FrameDecoder.

Here is the call graph for this function:

◆ droppedPartialBytes()

long de.yaacc.multiroom.codec.PcmFrameDecoder.droppedPartialBytes ( )

Bytes of incomplete frames thrown away so far (statistics).

Implements de.yaacc.multiroom.codec.FrameDecoder.

◆ reset()

void de.yaacc.multiroom.codec.PcmFrameDecoder.reset ( )

Forgets partial state (after a lost connection): the next chunk starts a fresh stream.

Implements de.yaacc.multiroom.codec.FrameDecoder.


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