diff options
author | Martijn van Beurden <mvanb1@gmail.com> | 2021-12-01 21:34:42 +0100 |
---|---|---|
committer | Martijn van Beurden <mvanb1@gmail.com> | 2022-05-02 07:59:01 +0200 |
commit | b5f4a1535c19e476b4987cb587e089288dc1bf70 (patch) | |
tree | a7f2dd64855239e3d3ab011e2b9558289b08d23d /include/FLAC++ | |
parent | 3fc5ba46375e48009cd9428091cd2ffd242de6b9 (diff) | |
download | flac-b5f4a1535c19e476b4987cb587e089288dc1bf70.tar.gz |
Add API functions to limit minimum bitrate
Quite a lot of decoders have trouble streaming or seeking in a
file with frames that only consist of constant subframes because
of the large difference between the largest and smallest subframe.
To remedy this, this commit makes it possible to disable the use
of constant subframes for the last subframe in case all others are
constant with a new API function. This means the minimum bitrate
for a FLAC file encoded with this function used is raised to
1bit/sample (i.e. 48kbit/s for 48kHz material). This commit also
adds tests to the test suite
Diffstat (limited to 'include/FLAC++')
-rw-r--r-- | include/FLAC++/encoder.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/FLAC++/encoder.h b/include/FLAC++/encoder.h index ce8d80a4..83ea4c2d 100644 --- a/include/FLAC++/encoder.h +++ b/include/FLAC++/encoder.h @@ -147,6 +147,7 @@ namespace FLAC { virtual bool set_total_samples_estimate(FLAC__uint64 value); ///< See FLAC__stream_encoder_set_total_samples_estimate() virtual bool set_metadata(::FLAC__StreamMetadata **metadata, uint32_t num_blocks); ///< See FLAC__stream_encoder_set_metadata() virtual bool set_metadata(FLAC::Metadata::Prototype **metadata, uint32_t num_blocks); ///< See FLAC__stream_encoder_set_metadata() + virtual bool set_limit_min_bitrate(bool value); ///< See FLAC__stream_encoder_set_limit_min_bitrate() /* get_state() is not virtual since we want subclasses to be able to return their own state */ State get_state() const; ///< See FLAC__stream_encoder_get_state() @@ -169,6 +170,7 @@ namespace FLAC { virtual uint32_t get_max_residual_partition_order() const; ///< See FLAC__stream_encoder_get_max_residual_partition_order() virtual uint32_t get_rice_parameter_search_dist() const; ///< See FLAC__stream_encoder_get_rice_parameter_search_dist() virtual FLAC__uint64 get_total_samples_estimate() const; ///< See FLAC__stream_encoder_get_total_samples_estimate() + virtual bool get_limit_min_bitrate() const; ///< See FLAC__stream_encoder_get_limit_min_bitrate() virtual ::FLAC__StreamEncoderInitStatus init(); ///< See FLAC__stream_encoder_init_stream() virtual ::FLAC__StreamEncoderInitStatus init_ogg(); ///< See FLAC__stream_encoder_init_ogg_stream() |