FLAC: Porting from FLAC 1.4.3 to 1.5.0

FLAC 1.5.0 Free Lossless Audio Codec

Porting from FLAC 1.4.3 to 1.5.0
Porting Guide for New Versions

This module describes porting from FLAC 1.4.3 to FLAC 1.5.0.

# Summary

Between FLAC 1.4.3 and FLAC 1.5.0, there have been changes to existing C functions and enums:

- the functions FLAC__metadata_get_streaminfo, FLAC__metadata_get_tags and FLAC__metadata_get_cuesheet can now read from Ogg FLAC files
- when encoding Ogg FLAC files, the 'samples' argument of the write callback no longer always returns 0.
- two error statuses have been added to the FLAC__StreamDecoderErrorStatus enum
- one status is added to FLAC__StreamDecoderState, which is only used when the new decoding of chained streams functionality is enabled
- one status is added to FLAC__StreamDecoderReadStatus, which is only used when the new decoding of chained streams functionality is enabled
- the function FLAC__metadata_chain_write_with_callbacks_and_tempfile can now be used regardless of whether a tempfile is actually needed, which is useful when writing to a new file is desired anyway

Furthermore, there have been the following additions:

- the functions FLAC__stream_decoder_set_decode_chained_stream, FLAC__stream_decoder_get_decode_chained_stream, FLAC__stream_decoder_finish_link, FLAC__stream_decoder_skip_single_link, FLAC__stream_decoder_process_until_end_of_link and FLAC__stream_decoder_get_link_lengths have been added to support decoding of chained streams
- the function FLAC__metadata_chain_write_new_file has been added, which is useful to combine copying of a file with changing its metadata
- the function FLAC__stream_decoder_find_total_samples was added, which seeks to the end of a file to find the total number of samples
- the function FLAC__stream_encoder_set_num_threads and FLAC__stream_encoder_get_num_threads have been added, which can be used to enable multithreading in the encoder

For the C++ API, changes are the same, but in C++ nomenclature

Copyright (c) 2000-2009 Josh Coalson Copyright (c) 2011-2025 Xiph.Org Foundation