|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javaFlacEncoder.StreamConfiguration
public class StreamConfiguration
This class defines the configuration options that may not change throughout a FLAC stream. In general, these setting must be set to match the input audio used(sample rate, sample size, channels, etc). After a stream has started, these settings must not change.
Field Summary | |
---|---|
static int |
DEFAULT_BITS_PER_SAMPLE
Default sample size |
static int |
DEFAULT_CHANNEL_COUNT
Default channel count |
static int |
DEFAULT_MAX_BLOCK_SIZE
Default maximum block size |
static int |
DEFAULT_MIN_BLOCK_SIZE
Default minimum block size |
static int |
DEFAULT_SAMPLE_RATE
Default sample rate |
static int |
MAX_BITS_PER_SAMPLE
Maximum bits per sample allowed(FLAC spec allows 32, limited to 24 here due to limits in code) |
static int |
MAX_BLOCK_SIZE
Maximum Block size allowed(defined by flac spec) |
static int |
MAX_CHANNEL_COUNT
Maximum channel count allowed(defined by flac spec) |
static int |
MAX_SAMPLE_RATE
Maximum sample rate allowed(defined by flac spec) |
static int |
MIN_BITS_PER_SAMPLE
Minimum bits per sample allowed(defined by flac spec) |
static int |
MIN_BLOCK_SIZE
Minimum block size allowed(defined by flac spec) |
static int |
MIN_SAMPLE_RATE
Minimum sample rate allowed(defined by flac spec) |
Constructor Summary | |
---|---|
StreamConfiguration()
Constructor, sets defaults for most values. |
|
StreamConfiguration(int channelCount,
int minBlock,
int maxBlock,
int sampleRate,
int bitsPerSample)
Constructor, allows setting of all options. |
|
StreamConfiguration(StreamConfiguration sc)
Copy Constructor. |
Method Summary | |
---|---|
int |
getBitsPerSample()
Get the number of bits per sample |
int |
getChannelCount()
Get the currently set channel count |
int |
getMaxBlockSize()
Get the currently set maximum block size |
int |
getMinBlockSize()
Get the currently set minimum block size |
int |
getSampleRate()
Get the currently set sample rate |
boolean |
isEncodingSubsetCompliant(EncodingConfiguration ec)
Test if this StreamConfiguration and a paired EncodingConfiguration define a Subset compliant stream. |
boolean |
isStreamSubsetCompliant()
Test if stream is Subset compliant. |
boolean |
isValid()
Test if the current configuration is valid. |
boolean |
setBitsPerSample(int bitsPerSample)
Set the bits per sample. |
boolean |
setChannelCount(int count)
Set number of channels in stream. |
int |
setMaxBlockSize(int size)
Set the maximum block size to use. |
int |
setMinBlockSize(int size)
Set the minimum block size to use. |
boolean |
setSampleRate(int rate)
Set the sample rate. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MAX_BLOCK_SIZE
public static final int MIN_BLOCK_SIZE
public static final int MAX_CHANNEL_COUNT
public static final int MIN_SAMPLE_RATE
public static final int MAX_SAMPLE_RATE
public static final int MIN_BITS_PER_SAMPLE
public static final int MAX_BITS_PER_SAMPLE
public static final int DEFAULT_CHANNEL_COUNT
public static final int DEFAULT_MAX_BLOCK_SIZE
public static final int DEFAULT_MIN_BLOCK_SIZE
public static final int DEFAULT_SAMPLE_RATE
public static final int DEFAULT_BITS_PER_SAMPLE
Constructor Detail |
---|
public StreamConfiguration()
public StreamConfiguration(StreamConfiguration sc)
sc
- StreamConfiguration object to copypublic StreamConfiguration(int channelCount, int minBlock, int maxBlock, int sampleRate, int bitsPerSample)
channelCount
- number of channels in source audio streamminBlock
- minimum block to use in FLAC stream.maxBlock
- maximum block size to use in FLAC streamsampleRate
- sample rate in Hz of audio streambitsPerSample
- sample size of audio streamMethod Detail |
---|
public boolean isValid()
public boolean setChannelCount(int count)
count
- Number of channels
public int getChannelCount()
public int getMaxBlockSize()
public int getMinBlockSize()
public int getSampleRate()
public boolean setSampleRate(int rate)
rate
- sample rate(in Hz)
public int getBitsPerSample()
public boolean setBitsPerSample(int bitsPerSample)
bitsPerSample
- number of bits per sample
public int setMaxBlockSize(int size)
size
- maximum block size to use.
public int setMinBlockSize(int size)
size
- minimum block size to use.
public boolean isStreamSubsetCompliant()
isEncodingSubsetCompliant
should be checked as well to ensure the combined Stream/Encoding
configurations are BOTH valid.
public boolean isEncodingSubsetCompliant(EncodingConfiguration ec)
ec
- EncodingConfiguration object to check against
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |