| Index: include/FLAC/format.h
|
| diff --git a/include/FLAC/format.h b/include/FLAC/format.h
|
| index 77e2d0130e5d66d10d453937ae0b63df87bdba4e..7424565b3b395d6a9c1a8ab94652a3c2c129aedc 100644
|
| --- a/include/FLAC/format.h
|
| +++ b/include/FLAC/format.h
|
| @@ -1,5 +1,6 @@
|
| /* libFLAC - Free Lossless Audio Codec library
|
| - * Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007 Josh Coalson
|
| + * Copyright (C) 2000-2009 Josh Coalson
|
| + * Copyright (C) 2011-2014 Xiph.Org Foundation
|
| *
|
| * Redistribution and use in source and binary forms, with or without
|
| * modification, are permitted provided that the following conditions
|
| @@ -508,9 +509,11 @@ typedef enum {
|
| FLAC__METADATA_TYPE_PICTURE = 6,
|
| /**< <A HREF="../format.html#metadata_block_picture">PICTURE</A> block */
|
|
|
| - FLAC__METADATA_TYPE_UNDEFINED = 7
|
| + FLAC__METADATA_TYPE_UNDEFINED = 7,
|
| /**< marker to denote beginning of undefined type range; this number will increase as new metadata types are added */
|
|
|
| + FLAC__MAX_METADATA_TYPE = FLAC__MAX_METADATA_TYPE_CODE,
|
| + /**< No type will ever be greater than this. There is not enough room in the protocol block. */
|
| } FLAC__MetadataType;
|
|
|
| /** Maps a FLAC__MetadataType to a C string.
|
| @@ -879,6 +882,18 @@ extern FLAC_API const unsigned FLAC__STREAM_METADATA_LENGTH_LEN; /**< == 24 (bit
|
| */
|
| FLAC_API FLAC__bool FLAC__format_sample_rate_is_valid(unsigned sample_rate);
|
|
|
| +/** Tests that a blocksize at the given sample rate is valid for the FLAC
|
| + * subset.
|
| + *
|
| + * \param blocksize The blocksize to test for compliance.
|
| + * \param sample_rate The sample rate is needed, since the valid subset
|
| + * blocksize depends on the sample rate.
|
| + * \retval FLAC__bool
|
| + * \c true if the given blocksize conforms to the specification for the
|
| + * subset at the given sample rate, else \c false.
|
| + */
|
| +FLAC_API FLAC__bool FLAC__format_blocksize_is_subset(unsigned blocksize, 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.
|
|
|