MCPcopy Create free account
hub / github.com/Tracktion/choc / read_zero_padding_

Function read_zero_padding_

choc/audio/choc_AudioFileFormat_FLAC.h:11975–11987  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11973}
11974
11975FLAC__bool read_zero_padding_(FLAC__StreamDecoder *decoder)
11976{
11977 if(!FLAC__bitreader_is_consumed_byte_aligned(decoder->private_->input)) {
11978 FLAC__uint32 zero = 0;
11979 if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &zero, FLAC__bitreader_bits_left_for_byte_alignment(decoder->private_->input)))
11980 return false; /* read_callback_ sets the state for us */
11981 if(zero != 0) {
11982 send_error_to_client_(decoder, FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC);
11983 decoder->protected_->state = FLAC__STREAM_DECODER_SEARCH_FOR_FRAME_SYNC;
11984 }
11985 }
11986 return true;
11987}
11988
11989FLAC__bool read_callback_(FLAC__byte buffer[], size_t *bytes, void *client_data)
11990{

Callers 1

read_frame_Function · 0.85

Tested by

no test coverage detected