summaryrefslogtreecommitdiffstats
path: root/include/FLAC/format.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/FLAC/format.h')
-rw-r--r--include/FLAC/format.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/include/FLAC/format.h b/include/FLAC/format.h
index 77e2d01..7424565 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.