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

The sample format of a PCM stream: rate, bits per sample and channels, like the sampleformat of a Snapcast stream (48000:16:2). More...

Collaboration diagram for de.yaacc.multiroom.feed.PcmFormat:
Collaboration graph

Public Member Functions

 PcmFormat (int sampleRate, int bitsPerSample, int channels)
 
int getSampleRate ()
 
int getBitsPerSample ()
 
int getChannels ()
 
int bytesPerFrame ()
 Bytes of one frame (one sample of every channel).
 
int bytesPerSecond ()
 Bytes of one second of audio.
 
String toSampleFormat ()
 The text of the Snapcast sampleformat parameter, for example 48000:16:2.
 
boolean equals (Object other)
 
int hashCode ()
 
String toString ()
 

Static Public Attributes

static final PcmFormat SNAPCAST_DEFAULT = new PcmFormat(48000, 16, 2)
 The format YAACC feeds a Snapcast server with: 48000 Hz, 16 bit, stereo (192,000 bytes per second).
 

Detailed Description

The sample format of a PCM stream: rate, bits per sample and channels, like the sampleformat of a Snapcast stream (48000:16:2).

Raw little-endian PCM, no header.

Constructor & Destructor Documentation

◆ PcmFormat()

de.yaacc.multiroom.feed.PcmFormat.PcmFormat ( int sampleRate,
int bitsPerSample,
int channels )
Parameters
sampleRate1 to 384,000 Hz
bitsPerSample8, 16, 24 or 32
channels1 to 8
Exceptions
IllegalArgumentExceptionfor a value outside these ranges

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