RetroArch
|
This module contains structure definitions for the representation of FLAC format components in memory. These are the basic structures used by the rest of the interfaces. More...
Classes | |
struct | FLAC__EntropyCodingMethod_PartitionedRiceContents |
struct | FLAC__EntropyCodingMethod_PartitionedRice |
struct | FLAC__EntropyCodingMethod |
struct | FLAC__Subframe_Constant |
struct | FLAC__Subframe_Verbatim |
struct | FLAC__Subframe_Fixed |
struct | FLAC__Subframe_LPC |
struct | FLAC__Subframe |
struct | FLAC__FrameHeader |
struct | FLAC__FrameFooter |
struct | FLAC__Frame |
struct | FLAC__StreamMetadata_StreamInfo |
struct | FLAC__StreamMetadata_Padding |
struct | FLAC__StreamMetadata_Application |
struct | FLAC__StreamMetadata_SeekPoint |
struct | FLAC__StreamMetadata_SeekTable |
struct | FLAC__StreamMetadata_VorbisComment_Entry |
struct | FLAC__StreamMetadata_VorbisComment |
struct | FLAC__StreamMetadata_CueSheet_Index |
struct | FLAC__StreamMetadata_CueSheet_Track |
struct | FLAC__StreamMetadata_CueSheet |
struct | FLAC__StreamMetadata_Picture |
struct | FLAC__StreamMetadata_Unknown |
struct | FLAC__StreamMetadata |
Macros | |
#define | FLAC__MAX_METADATA_TYPE_CODE (126u) |
#define | FLAC__MIN_BLOCK_SIZE (16u) |
#define | FLAC__MAX_BLOCK_SIZE (65535u) |
#define | FLAC__SUBSET_MAX_BLOCK_SIZE_48000HZ (4608u) |
#define | FLAC__MAX_CHANNELS (8u) |
#define | FLAC__MIN_BITS_PER_SAMPLE (4u) |
#define | FLAC__MAX_BITS_PER_SAMPLE (32u) |
#define | FLAC__REFERENCE_CODEC_MAX_BITS_PER_SAMPLE (24u) |
#define | FLAC__MAX_SAMPLE_RATE (655350u) |
#define | FLAC__MAX_LPC_ORDER (32u) |
#define | FLAC__SUBSET_MAX_LPC_ORDER_48000HZ (12u) |
#define | FLAC__MIN_QLP_COEFF_PRECISION (5u) |
#define | FLAC__MAX_QLP_COEFF_PRECISION (15u) |
#define | FLAC__MAX_FIXED_ORDER (4u) |
#define | FLAC__MAX_RICE_PARTITION_ORDER (15u) |
#define | FLAC__SUBSET_MAX_RICE_PARTITION_ORDER (8u) |
#define | FLAC__STREAM_SYNC_LENGTH (4u) |
#define | FLAC__STREAM_METADATA_STREAMINFO_LENGTH (34u) |
#define | FLAC__STREAM_METADATA_SEEKPOINT_LENGTH (18u) |
#define | FLAC__STREAM_METADATA_HEADER_LENGTH (4u) |
This module contains structure definitions for the representation of FLAC format components in memory. These are the basic structures used by the rest of the interfaces.
First, you should be familiar with the FLAC format. Many of the values here follow directly from the specification. As a user of libFLAC, the interesting parts really are the structures that describe the frame header and metadata blocks.
The format structures here are very primitive, designed to store information in an efficient way. Reading information from the structures is easy but creating or modifying them directly is more complex. For the most part, as a user of a library, editing is not necessary; however, for metadata blocks it is, so there are convenience functions provided in the metadata module to simplify the manipulation of metadata blocks.
#define FLAC__MAX_BITS_PER_SAMPLE (32u) |
The maximum sample resolution permitted by the format.
#define FLAC__MAX_BLOCK_SIZE (65535u) |
The maximum block size, in samples, permitted by the format.
#define FLAC__MAX_CHANNELS (8u) |
The maximum number of channels permitted by the format.
#define FLAC__MAX_FIXED_ORDER (4u) |
The maximum order of the fixed predictors permitted by the format.
#define FLAC__MAX_LPC_ORDER (32u) |
The maximum LPC order permitted by the format.
#define FLAC__MAX_METADATA_TYPE_CODE (126u) |
The largest legal metadata type code.
#define FLAC__MAX_QLP_COEFF_PRECISION (15u) |
The maximum quantized linear predictor coefficient precision permitted by the format.
#define FLAC__MAX_RICE_PARTITION_ORDER (15u) |
The maximum Rice partition order permitted by the format.
#define FLAC__MAX_SAMPLE_RATE (655350u) |
The maximum sample rate permitted by the format. The value is ((2 ^ 16) - 1) * 10; see FLAC format as to why.
#define FLAC__MIN_BITS_PER_SAMPLE (4u) |
The minimum sample resolution permitted by the format.
#define FLAC__MIN_BLOCK_SIZE (16u) |
The minimum block size, in samples, permitted by the format.
#define FLAC__MIN_QLP_COEFF_PRECISION (5u) |
The minimum quantized linear predictor coefficient precision permitted by the format.
#define FLAC__REFERENCE_CODEC_MAX_BITS_PER_SAMPLE (24u) |
The maximum sample resolution permitted by libFLAC.
#define FLAC__STREAM_METADATA_HEADER_LENGTH (4u) |
The total stream length of a metadata block header in bytes.
#define FLAC__STREAM_METADATA_SEEKPOINT_LENGTH (18u) |
The total stream length of a seek point in bytes.
#define FLAC__STREAM_METADATA_STREAMINFO_LENGTH (34u) |
The total stream length of the STREAMINFO block in bytes.
#define FLAC__STREAM_SYNC_LENGTH (4u) |
The length of the FLAC signature in bytes.
#define FLAC__SUBSET_MAX_BLOCK_SIZE_48000HZ (4608u) |
The maximum block size, in samples, permitted by the FLAC subset for sample rates up to 48kHz.
#define FLAC__SUBSET_MAX_LPC_ORDER_48000HZ (12u) |
The maximum LPC order permitted by the FLAC subset for sample rates up to 48kHz.
#define FLAC__SUBSET_MAX_RICE_PARTITION_ORDER (8u) |
The maximum Rice partition order permitted by the FLAC Subset.
An enumeration of the available entropy coding methods.
enum FLAC__MetadataType |
An enumeration of the available metadata block types.
Enumerator | |
---|---|
FLAC__METADATA_TYPE_STREAMINFO | STREAMINFO block |
FLAC__METADATA_TYPE_PADDING | PADDING block |
FLAC__METADATA_TYPE_APPLICATION | APPLICATION block |
FLAC__METADATA_TYPE_SEEKTABLE | SEEKTABLE block |
FLAC__METADATA_TYPE_VORBIS_COMMENT | VORBISCOMMENT block (a.k.a. FLAC tags) |
FLAC__METADATA_TYPE_CUESHEET | CUESHEET block |
FLAC__METADATA_TYPE_PICTURE | PICTURE block |
FLAC__METADATA_TYPE_UNDEFINED | marker to denote beginning of undefined type range; this number will increase as new metadata types are added |
FLAC__MAX_METADATA_TYPE | No type will ever be greater than this. There is not enough room in the protocol block. |
An enumeration of the PICTURE types (see FLAC__StreamMetadataPicture and id3 v2.4 APIC tag).
enum FLAC__SubframeType |
FLAC_API FLAC__bool FLAC__format_blocksize_is_subset | ( | unsigned | blocksize, |
unsigned | sample_rate | ||
) |
Tests that a blocksize at the given sample rate is valid for the FLAC subset.
blocksize | The blocksize to test for compliance. |
sample_rate | The sample rate is needed, since the valid subset blocksize depends on the sample rate. |
FLAC__bool | true if the given blocksize conforms to the specification for the subset at the given sample rate, else false . |
FLAC_API FLAC__bool FLAC__format_cuesheet_is_legal | ( | const FLAC__StreamMetadata_CueSheet * | cue_sheet, |
FLAC__bool | check_cd_da_subset, | ||
const char ** | violation | ||
) |
Check a cue sheet to see if it conforms to the FLAC specification. See the format specification for limits on the contents of the cue sheet.
cue_sheet | A pointer to an existing cue sheet to be checked. |
check_cd_da_subset | If true , check CUESHEET against more stringent requirements for a CD-DA (audio) disc. |
violation | Address of a pointer to a string. If there is a violation, a pointer to a string explanation of the violation will be returned here. violation may be NULL if you don't need the returned string. Do not free the returned string; it will always point to static data. cue_sheet != NULL |
FLAC__bool | false if cue sheet is illegal, else true . |
FLAC_API FLAC__bool FLAC__format_picture_is_legal | ( | const FLAC__StreamMetadata_Picture * | picture, |
const char ** | violation | ||
) |
Check picture data to see if it conforms to the FLAC specification. See the format specification for limits on the contents of the PICTURE block.
picture | A pointer to existing picture data to be checked. |
violation | Address of a pointer to a string. If there is a violation, a pointer to a string explanation of the violation will be returned here. violation may be NULL if you don't need the returned string. Do not free the returned string; it will always point to static data. picture != NULL |
FLAC__bool | false if picture data is illegal, else true . |
FLAC_API FLAC__bool FLAC__format_sample_rate_is_subset | ( | unsigned | sample_rate | ) |
Tests that a sample rate is valid for the FLAC subset. The subset rules for valid sample rates are slightly more complex since the rate has to be expressible completely in the frame header.
sample_rate | The sample rate to test for compliance. |
FLAC__bool | true if the given sample rate conforms to the specification for the subset, else false . |
FLAC_API FLAC__bool FLAC__format_sample_rate_is_valid | ( | unsigned | sample_rate | ) |
Tests that a sample rate is valid for FLAC.
sample_rate | The sample rate to test for compliance. |
FLAC__bool | true if the given sample rate conforms to the specification, else false . |
FLAC_API FLAC__bool FLAC__format_seektable_is_legal | ( | const FLAC__StreamMetadata_SeekTable * | seek_table | ) |
Check a seek table to see if it conforms to the FLAC specification. See the format specification for limits on the contents of the seek table.
seek_table | A pointer to a seek table to be checked. seek_table != NULL |
FLAC__bool | false if seek table is illegal, else true . |
FLAC_API unsigned FLAC__format_seektable_sort | ( | FLAC__StreamMetadata_SeekTable * | seek_table | ) |
Sort a seek table's seek points according to the format specification. This includes a "unique-ification" step to remove duplicates, i.e. seek points with identical sample_number values. Duplicate seek points are converted into placeholder points and sorted to the end of the table.
seek_table | A pointer to a seek table to be sorted. seek_table != NULL |
unsigned | The number of duplicate seek points converted into placeholders. |
FLAC_API FLAC__bool FLAC__format_vorbiscomment_entry_is_legal | ( | const FLAC__byte * | entry, |
unsigned | length | ||
) |
Check a Vorbis comment entry to see if it conforms to the Vorbis comment specification.
Vorbis comment entries must be of the form 'name=value', and 'name' and 'value' must be legal according to FLAC__format_vorbiscomment_entry_name_is_legal() and FLAC__format_vorbiscomment_entry_value_is_legal() respectively.
entry | An entry to be checked. |
length | The length of entry in bytes. |
FLAC__bool | false if entry name is illegal, else true . |
FLAC_API FLAC__bool FLAC__format_vorbiscomment_entry_name_is_legal | ( | const char * | name | ) |
Check a Vorbis comment entry name to see if it conforms to the Vorbis comment specification.
Vorbis comment names must be composed only of characters from [0x20-0x3C,0x3E-0x7D].
name | A NUL-terminated string to be checked. |
FLAC__bool | false if entry name is illegal, else true . |
FLAC_API FLAC__bool FLAC__format_vorbiscomment_entry_value_is_legal | ( | const FLAC__byte * | value, |
unsigned | length | ||
) |
Check a Vorbis comment entry value to see if it conforms to the Vorbis comment specification.
Vorbis comment values must be valid UTF-8 sequences.
value | A string to be checked. |
length | A the length of value in bytes. May be (unsigned)(-1) to indicate that value is a plain UTF-8 NUL-terminated string. |
FLAC__bool | false if entry name is illegal, else true . |
Maps a FLAC__ChannelAssignment to a C string.
Using a FLAC__ChannelAssignment as the index to this array will give the string equivalent. The contents should not be modified.
== (1<<FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE2_PARAMETER_LEN)-1
== (1<<FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE_PARAMETER_LEN)-1
Maps a FLAC__EntropyCodingMethodType to a C string.
Using a FLAC__EntropyCodingMethodType as the index to this array will give the string equivalent. The contents should not be modified.
Maps a FLAC__FrameNumberType to a C string.
Using a FLAC__FrameNumberType as the index to this array will give the string equivalent. The contents should not be modified.
Maps a FLAC__MetadataType to a C string.
Using a FLAC__MetadataType as the index to this array will give the string equivalent. The contents should not be modified.
FLAC_API const FLAC__uint64 FLAC__STREAM_METADATA_SEEKPOINT_PLACEHOLDER |
The value used in the sample_number field of FLAC__StreamMetadataSeekPoint used to indicate a placeholder point (== 0xffffffffffffffff).
The 32-bit integer big-endian representation of the beginning of a FLAC stream.
FLAC_API const FLAC__byte FLAC__STREAM_SYNC_STRING[4] |
The byte string representation of the beginning of a FLAC stream.
Maps a FLAC__StreamMetadata_Picture_Type to a C string.
Using a FLAC__StreamMetadata_Picture_Type as the index to this array will give the string equivalent. The contents should not be modified.
== 1 (bit)
This used to be a zero-padding bit (hence the name FLAC__SUBFRAME_ZERO_PAD_LEN) but is now a reserved bit. It still has a mandatory value of 0
but in the future may take on the value 0
or 1
to mean something else.
Maps a FLAC__SubframeType to a C string.
Using a FLAC__SubframeType as the index to this array will give the string equivalent. The contents should not be modified.
The vendor string inserted by the encoder into the VORBIS_COMMENT block. This is a NUL-terminated ASCII string; when inserted into the VORBIS_COMMENT the trailing null is stripped.