Package javaFlacEncoder

This package defines a FLAC encoder with a simple interface for enabling FLAC encoding support in an application.

See:
          Description

Interface Summary
FLACOutputStream This interface defines a location to write the output of the FLAC encoder to.
 

Class Summary
ArrayRecycler The purpose of this class is to provide a source for reusable int arrays.
BlockEncodeRequest BlockEncodeRequests are used to store a full block and necessary information to encode such block.
BlockThreadManager BlockThreadManager is used by FLACEncoder(when encoding with threads), to dispatch BlockEncodeRequests to ThreadFrames which do the actual encode.
ChannelData  
CRC16 Class to calculate a CRC16 checksum.
CRC8 Class to calculate a CRC8 checksum.
EncodedElement EncodedElement class provides is used to store data in the proper bitstream format for FLAC audio.
EncodedElement_32 EncodedElement which uses an integer array as a backing, rather than the byte array.
EncodingConfiguration This class defines the configuration options that are allowed to change within a FLAC stream.
FLAC_ConsoleFileEncoder FLAC_ConsoleFileEncoder is the command line interface to this FLAC encoder.
FLAC_FileEncoder FLAC_FileEncoder is a class to encode an input wav File to an output Flac file.
FLACEncoder This class defines a FLAC Encoder with a simple interface for enabling FLAC encoding support in an application.
FLACFileOutputStream This class provides basic file output for writing from a FLACEncoder.
FLACStreamIdentifier Provides the stream identifier used at beginning of flac streams.
Frame Handles taking a set of audio samples, and splitting it into the proper subframes, and returning the resulting encoded data.
FrameHeader This class is used to generate a Frame Header for a FLAC Frame.
FrameThread The FrameThread class provides threading support for a Frame object, allowing multi-threaded encodings of FLAC frames.
LPC This class is used to calculate LPC Coefficients for a FLAC stream.
MetadataBlockHeader The MetadataBlockHeader class is used to creat FLAC compliant Metadata Block Headers.
MetadataBlockStreamInfo MetadataBlockStreamInfo is used to declare the initial stream parameters, such as Sample Rate, bits per sample, and number of channels, as well as information on the encoded stream such as total number of samples, minimum and maximum block and frame sizes, and md5sum of raw audio samples.
RiceEncoder The RiceEncoder class is used to create FLAC-compliant rice-encoded residuals.
StreamConfiguration This class defines the configuration options that may not change throughout a FLAC stream.
Subframe Description: This abstract class declares the methods needed to retrieve encoded data in a standard format(across the different implemented Subframe types), as well as the generic methods needed to write the subframe header.
Subframe_Constant Implements the Subframe abstract class, providing encoding support for the FLAC Constant Subframe.
Subframe_Fixed Implements the Subframe abstract class, providing encoding support for the FLAC Fixed-predictor Subframe.
Subframe_LPC Implements the Subframe abstract class, providing encoding support for the FLAC LPC Subframe.
Subframe_Verbatim Implements the Subframe abstract class, providing encoding support for the FLAC Verbatim Subframe.
UTF8Modified This is a utility class that provides methods to both encode to and decode from the extended version of UTF8 used by the FLAC format.
 

Enum Summary
ChannelData.ChannelName  
EncodingConfiguration.ChannelConfig Defines the options for channel configuration to use.
EncodingConfiguration.SubframeType Defines the various subframe types that may be used.
FLAC_FileEncoder.Status Status enum for encode result
MetadataBlockHeader.MetadataBlockType Enum containing the different Metadata block types.
 

Package javaFlacEncoder Description

This package defines a FLAC encoder with a simple interface for enabling FLAC encoding support in an application. This class is appropriate for use in the case where you have raw pcm audio samples that you wish to encode. Currently, fixed-blocksize only is implemented, with the "Maximum Block Size" set in the StreamConfiguration object used as the actual block size.

To use this library, an application should primarily use the classes FLACEncoder, EncodingConfiguration, StreamConfiguration, and FLACOutputStream. If you're simply needing to encode a file(as opposed to a stream), you may use FLAC_FileEncoder.


An encoding process is simple, and should follow these steps:

1) Set StreamConfiguration to appropriate values. After a stream is opened, this must not be altered until the stream is closed.
2) Set FLACOutputStream, object to write results to.
3) Open FLAC Stream
4) Set EncodingConfiguration(if defaults are insufficient).
5) Add samples to encoder
6) Encode Samples
7) Close stream
(note: steps 4,5, and 6 may be done repeatedly, in any order. However, see related method documentation for info on concurrent use)