diff options
author | Robert Shih <robertshih@google.com> | 2015-01-05 17:35:54 -0800 |
---|---|---|
committer | Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> | 2015-10-18 22:49:31 +0200 |
commit | f18d1a93390fedbb03f81db82322215ce027c1e0 (patch) | |
tree | fa607172a51170011043a907c3a475da4c60c24a /include/FLAC/format.h | |
parent | 686d6ff2afda2ea3211bec37ad0daa655c24e6d4 (diff) | |
download | external_flac-f18d1a93390fedbb03f81db82322215ce027c1e0.zip external_flac-f18d1a93390fedbb03f81db82322215ce027c1e0.tar.gz external_flac-f18d1a93390fedbb03f81db82322215ce027c1e0.tar.bz2 |
libFLAC: merge master from Xiph
remote: https://git.xiph.org/flac.git
commit: 775eb93
Bug: 18872897
Bug: 18910747
Change-Id: I6e450e44c96b97c3323e428b9e6d420422f24a4e
(cherry picked from commit 31e4f3166a91a2ebb34f643787122a638d9f1471)
Tested-by: Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de>
Diffstat (limited to 'include/FLAC/format.h')
-rw-r--r-- | include/FLAC/format.h | 19 |
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. |