javaFlacEncoder
Class EncodingConfiguration

java.lang.Object
  extended by javaFlacEncoder.EncodingConfiguration
All Implemented Interfaces:
java.lang.Cloneable

public class EncodingConfiguration
extends java.lang.Object
implements java.lang.Cloneable

This class defines the configuration options that are allowed to change within a FLAC stream. Options here may be changed from one frame to the next. In general, the settings should not need altered, but the option to do so remains.

Author:
Preston Lacey

Nested Class Summary
static class EncodingConfiguration.ChannelConfig
          Defines the options for channel configuration to use.
static class EncodingConfiguration.SubframeType
          Defines the various subframe types that may be used.
 
Field Summary
static EncodingConfiguration.ChannelConfig DEFAULT_CHANNEL_CONFIG
          Default channel configuration
static int DEFAULT_MAX_LPC_ORDER
          Default maximum lpc order to use
static int DEFAULT_MAX_RICE_ORDER
          Default maximum Rice partition order
static int DEFAULT_MIN_LPC_ORDER
          Default minimum lpc order to use
static EncodingConfiguration.SubframeType DEFAULT_SUBFRAME_TYPE
          Default subframe type to use
static int MAX_LPC_ORDER
          Maximum LPC order possible(as defined by FLAC format)
static int MAX_RICE_PARTITION_ORDER
          Maximum Rice Partition order possible(as defined by FLAC Format)
static int MIN_LPC_ORDER
          Minimum LPC order possible(as defined by FLAC format)
 
Constructor Summary
EncodingConfiguration()
          Constructor, uses defaults for all options.
EncodingConfiguration(EncodingConfiguration e)
          Copy constructor.
 
Method Summary
 EncodingConfiguration.ChannelConfig getChannelConfig()
          Get the current channel configuration value.
 int getMaxLPCOrder()
          Get maximum LPC order
 int getMinLPCOrder()
          Get current minimum LPC order
 EncodingConfiguration.SubframeType getSubframeType()
          Get the current subframe type
 void setChannelConfig(EncodingConfiguration.ChannelConfig conf)
          Set the channel configuration to use.
 void setMaxLPCOrder(int order)
          Set the maximum LPC order.
 void setMinLPCOrder(int order)
          Set the minimum LPC order.
 void setSubframeType(EncodingConfiguration.SubframeType type)
          Set the subframe type to use.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_LPC_ORDER

public static final int MAX_LPC_ORDER
Maximum LPC order possible(as defined by FLAC format)

See Also:
Constant Field Values

MIN_LPC_ORDER

public static final int MIN_LPC_ORDER
Minimum LPC order possible(as defined by FLAC format)

See Also:
Constant Field Values

MAX_RICE_PARTITION_ORDER

public static final int MAX_RICE_PARTITION_ORDER
Maximum Rice Partition order possible(as defined by FLAC Format)

See Also:
Constant Field Values

DEFAULT_SUBFRAME_TYPE

public static final EncodingConfiguration.SubframeType DEFAULT_SUBFRAME_TYPE
Default subframe type to use


DEFAULT_CHANNEL_CONFIG

public static final EncodingConfiguration.ChannelConfig DEFAULT_CHANNEL_CONFIG
Default channel configuration


DEFAULT_MAX_LPC_ORDER

public static final int DEFAULT_MAX_LPC_ORDER
Default maximum lpc order to use

See Also:
Constant Field Values

DEFAULT_MIN_LPC_ORDER

public static final int DEFAULT_MIN_LPC_ORDER
Default minimum lpc order to use

See Also:
Constant Field Values

DEFAULT_MAX_RICE_ORDER

public static final int DEFAULT_MAX_RICE_ORDER
Default maximum Rice partition order

See Also:
Constant Field Values
Constructor Detail

EncodingConfiguration

public EncodingConfiguration()
Constructor, uses defaults for all options. These defaults should be good for most purposes.


EncodingConfiguration

public EncodingConfiguration(EncodingConfiguration e)
Copy constructor.

Parameters:
e - EncodingConfiguration object to copy. Must not be null.
Method Detail

setChannelConfig

public void setChannelConfig(EncodingConfiguration.ChannelConfig conf)
Set the channel configuration to use. Channel configuration refers to the way multiple channels are processed. See documentation for ChannelConfig for more info on choices.

Parameters:
conf - Channel configuration to use.

getChannelConfig

public EncodingConfiguration.ChannelConfig getChannelConfig()
Get the current channel configuration value.

Returns:
current channel configuration value

setSubframeType

public void setSubframeType(EncodingConfiguration.SubframeType type)
Set the subframe type to use. This refers to the way each subframe(channel) is compressed. See documentation for SubframeType for more info on choices.

Parameters:
type -

getSubframeType

public EncodingConfiguration.SubframeType getSubframeType()
Get the current subframe type

Returns:
current subframe type

getMinLPCOrder

public int getMinLPCOrder()
Get current minimum LPC order

Returns:
current minimum lpc order

getMaxLPCOrder

public int getMaxLPCOrder()
Get maximum LPC order

Returns:
current maximum lpc order

setMinLPCOrder

public void setMinLPCOrder(int order)
Set the minimum LPC order. If order given is out of the valid range(as defined by MAX_LPC_ORDER and MIN_LPC_ORDER), it will be set to the closest valid value instead.

Parameters:
order - minimum LPC order to use

setMaxLPCOrder

public void setMaxLPCOrder(int order)
Set the maximum LPC order. If order given is out of the valid range (as defined by MAX_LPC_ORDER and MIN_LPC_ORDER), it will be set to the closest valid value instead.

Parameters:
order - maximum LPC order to use