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

Converts samples to 16 bit little endian PCM, the only format the sink takes. More...

Collaboration diagram for de.yaacc.multiroom.codec.PcmConverter:
Collaboration graph

Classes

enum  Encoding
 The sample encodings that can be converted. More...
 

Static Public Member Functions

static byte[] toPcm16 (byte[] source, int offset, int sampleCount, Encoding encoding)
 

Detailed Description

Converts samples to 16 bit little endian PCM, the only format the sink takes.

Integer samples of more than 16 bit keep their top 16 bits, rounded to nearest (halves up) and clipped; float samples (-1 to 1) are scaled, rounded and clipped, NaN is silence. Pure.

Member Function Documentation

◆ toPcm16()

static byte[] de.yaacc.multiroom.codec.PcmConverter.toPcm16 ( byte[] source,
int offset,
int sampleCount,
Encoding encoding )
static
Parameters
sourcesamples in encoding, little endian, interleaved
sampleCounthow many samples (not frames) to convert; the source must hold at least that many
Returns
sampleCount 16 bit samples, little endian

Referenced by de.yaacc.multiroom.codec.PcmFrameDecoder.decode().

Here is the caller graph for this function:

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