Lines Matching refs:decoder
280 static FLAC__StreamDecoderWriteStatus write_callback_(const FLAC__StreamDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data)
288 (void)decoder;
309 static void metadata_callback_(const FLAC__StreamDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data)
313 (void)decoder;
332 static void error_callback_(const FLAC__StreamDecoder *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data)
336 (void)decoder, (void)status;
344 FLAC__StreamDecoder *decoder = FLAC__stream_decoder_new();
346 if(0 == decoder)
352 FLAC__stream_decoder_set_md5_checking(decoder, false);
353 FLAC__stream_decoder_set_metadata_ignore_all(decoder);
354 FLAC__stream_decoder_set_metadata_respond(decoder, FLAC__METADATA_TYPE_STREAMINFO);
356 if(FLAC__stream_decoder_init_file(decoder, filename, write_callback_, metadata_callback_, error_callback_, &instance) != FLAC__STREAM_DECODER_INIT_STATUS_OK) {
357 FLAC__stream_decoder_delete(decoder);
358 return "initializing decoder";
361 if(!FLAC__stream_decoder_process_until_end_of_stream(decoder) || instance.error) {
362 FLAC__stream_decoder_delete(decoder);
366 FLAC__stream_decoder_delete(decoder);