diff --git a/third_party/flac/include/FLAC/stream_decoder.h b/third_party/flac/include/FLAC/stream_decoder.h index e2212c3bbcb14..b5b9a96ac7e77 100644 --- a/third_party/flac/include/FLAC/stream_decoder.h +++ b/third_party/flac/include/FLAC/stream_decoder.h @@ -1105,7 +1105,7 @@ FLAC_API FLAC__StreamDecoderInitStatus FLAC__stream_decoder_init_stream( void *client_data ); -#ifndef COBALT +#ifndef STARBOARD /** Initialize the decoder instance to decode Ogg FLAC streams. * * This flavor of initialization sets up the decoder to decode from a @@ -1368,7 +1368,7 @@ FLAC_API FLAC__StreamDecoderInitStatus FLAC__stream_decoder_init_ogg_file( FLAC__StreamDecoderErrorCallback error_callback, void *client_data ); -#endif // COBALT +#endif // STARBOARD /** Finish the decoding process. * Flushes the decoding buffer, releases resources, resets the decoder diff --git a/third_party/flac/include/FLAC/stream_encoder.h b/third_party/flac/include/FLAC/stream_encoder.h index 1f097426dc8fd..5f6476e68488f 100644 --- a/third_party/flac/include/FLAC/stream_encoder.h +++ b/third_party/flac/include/FLAC/stream_encoder.h @@ -1607,7 +1607,7 @@ FLAC__stream_encoder_get_limit_min_bitrate(const FLAC__StreamEncoder* encoder); */ FLAC_API FLAC__StreamEncoderInitStatus FLAC__stream_encoder_init_stream(FLAC__StreamEncoder *encoder, FLAC__StreamEncoderWriteCallback write_callback, FLAC__StreamEncoderSeekCallback seek_callback, FLAC__StreamEncoderTellCallback tell_callback, FLAC__StreamEncoderMetadataCallback metadata_callback, void *client_data); -#ifndef COBALT +#ifndef STARBOARD /** Initialize the encoder instance to encode Ogg FLAC streams. * * This flavor of initialization sets up the encoder to encode to a FLAC @@ -1817,7 +1817,7 @@ FLAC_API FLAC__StreamEncoderInitStatus FLAC__stream_encoder_init_file(FLAC__Stre * see FLAC__StreamEncoderInitStatus for the meanings of other return values. */ FLAC_API FLAC__StreamEncoderInitStatus FLAC__stream_encoder_init_ogg_file(FLAC__StreamEncoder *encoder, const char *filename, FLAC__StreamEncoderProgressCallback progress_callback, void *client_data); -#endif // COBALT +#endif // STARBOARD /** Finish the encoding process. * Flushes the encoding buffer, releases resources, resets the encoder diff --git a/third_party/flac/src/libFLAC/bitreader.c b/third_party/flac/src/libFLAC/bitreader.c index b0b4efc121567..7b468ddd4f6bd 100644 --- a/third_party/flac/src/libFLAC/bitreader.c +++ b/third_party/flac/src/libFLAC/bitreader.c @@ -346,7 +346,7 @@ FLAC__bool FLAC__bitreader_rewind_to_after_last_seen_framesync(FLAC__BitReader * } } -#ifndef COBALT +#ifndef STARBOARD void FLAC__bitreader_dump(const FLAC__BitReader *br, FILE *out) { uint32_t i, j; @@ -376,7 +376,7 @@ void FLAC__bitreader_dump(const FLAC__BitReader *br, FILE *out) } } } -#endif // COBALT +#endif // STARBOARD void FLAC__bitreader_reset_read_crc16(FLAC__BitReader *br, FLAC__uint16 seed) { diff --git a/third_party/flac/src/libFLAC/bitwriter.c b/third_party/flac/src/libFLAC/bitwriter.c index de6dfeaacc8bf..ee8b94966237c 100644 --- a/third_party/flac/src/libFLAC/bitwriter.c +++ b/third_party/flac/src/libFLAC/bitwriter.c @@ -198,7 +198,7 @@ void FLAC__bitwriter_clear(FLAC__BitWriter *bw) bw->words = bw->bits = 0; } -#ifndef COBALT +#ifndef STARBOARD void FLAC__bitwriter_dump(const FLAC__BitWriter *bw, FILE *out) { uint32_t i, j; @@ -222,7 +222,7 @@ void FLAC__bitwriter_dump(const FLAC__BitWriter *bw, FILE *out) } } } -#endif // COBALT +#endif // STARBOARD FLAC__bool FLAC__bitwriter_get_write_crc16(FLAC__BitWriter *bw, FLAC__uint16 *crc) { diff --git a/third_party/flac/src/libFLAC/include/private/bitreader.h b/third_party/flac/src/libFLAC/include/private/bitreader.h index 4bc7c3fa34b78..bea1b05147983 100644 --- a/third_party/flac/src/libFLAC/include/private/bitreader.h +++ b/third_party/flac/src/libFLAC/include/private/bitreader.h @@ -56,9 +56,9 @@ FLAC__bool FLAC__bitreader_clear(FLAC__BitReader *br); void FLAC__bitreader_set_framesync_location(FLAC__BitReader* br); FLAC__bool FLAC__bitreader_rewind_to_after_last_seen_framesync( FLAC__BitReader* br); -#ifndef COBALT +#ifndef STARBOARD void FLAC__bitreader_dump(const FLAC__BitReader *br, FILE *out); -#endif // COBALT +#endif // STARBOARD /* * CRC functions diff --git a/third_party/flac/src/libFLAC/include/private/bitwriter.h b/third_party/flac/src/libFLAC/include/private/bitwriter.h index d0329cf6d35e7..6fa1a66b23e96 100644 --- a/third_party/flac/src/libFLAC/include/private/bitwriter.h +++ b/third_party/flac/src/libFLAC/include/private/bitwriter.h @@ -50,9 +50,9 @@ void FLAC__bitwriter_delete(FLAC__BitWriter *bw); FLAC__bool FLAC__bitwriter_init(FLAC__BitWriter *bw); void FLAC__bitwriter_free(FLAC__BitWriter *bw); /* does not 'free(buffer)' */ void FLAC__bitwriter_clear(FLAC__BitWriter *bw); -#ifndef COBALT +#ifndef STARBOARD void FLAC__bitwriter_dump(const FLAC__BitWriter *bw, FILE *out); -#endif // COBALT +#endif // STARBOARD /* * CRC functions diff --git a/third_party/flac/src/libFLAC/stream_decoder.c b/third_party/flac/src/libFLAC/stream_decoder.c index b40be13c98bec..b05da0857162f 100644 --- a/third_party/flac/src/libFLAC/stream_decoder.c +++ b/third_party/flac/src/libFLAC/stream_decoder.c @@ -73,9 +73,9 @@ static const FLAC__byte ID3V2_TAG_[3] = { 'I', 'D', '3' }; ***********************************************************************/ static void set_defaults_(FLAC__StreamDecoder *decoder); -#ifndef COBALT +#ifndef STARBOARD static FILE *get_binary_stdin_(void); -#endif // COBALT +#endif // STARBOARD static FLAC__bool allocate_output_(FLAC__StreamDecoder *decoder, uint32_t size, uint32_t channels, uint32_t bps); static FLAC__bool has_id_filtered_(FLAC__StreamDecoder *decoder, FLAC__byte *id); static FLAC__bool find_metadata_(FLAC__StreamDecoder *decoder); @@ -108,13 +108,13 @@ static FLAC__bool seek_to_absolute_sample_(FLAC__StreamDecoder *decoder, FLAC__u #if FLAC__HAS_OGG static FLAC__bool seek_to_absolute_sample_ogg_(FLAC__StreamDecoder *decoder, FLAC__uint64 stream_length, FLAC__uint64 target_sample); #endif -#ifndef COBALT +#ifndef STARBOARD static FLAC__StreamDecoderReadStatus file_read_callback_(const FLAC__StreamDecoder *decoder, FLAC__byte buffer[], size_t *bytes, void *client_data); static FLAC__StreamDecoderSeekStatus file_seek_callback_(const FLAC__StreamDecoder *decoder, FLAC__uint64 absolute_byte_offset, void *client_data); static FLAC__StreamDecoderTellStatus file_tell_callback_(const FLAC__StreamDecoder *decoder, FLAC__uint64 *absolute_byte_offset, void *client_data); static FLAC__StreamDecoderLengthStatus file_length_callback_(const FLAC__StreamDecoder *decoder, FLAC__uint64 *stream_length, void *client_data); static FLAC__bool file_eof_callback_(const FLAC__StreamDecoder *decoder, void *client_data); -#endif // COBALT +#endif // STARBOARD /*********************************************************************** * @@ -133,9 +133,9 @@ typedef struct FLAC__StreamDecoderPrivate { FLAC__StreamDecoderMetadataCallback metadata_callback; FLAC__StreamDecoderErrorCallback error_callback; void *client_data; -#ifndef COBALT +#ifndef STARBOARD FILE *file; /* only used if FLAC__stream_decoder_init_file()/FLAC__stream_decoder_init_file() called, else NULL */ -#endif // COBALT +#endif // STARBOARD FLAC__BitReader *input; FLAC__int32 *output[FLAC__MAX_CHANNELS]; FLAC__int32 *residual[FLAC__MAX_CHANNELS]; /* WATCHOUT: these are the aligned pointers; the real pointers that should be free()'d are residual_unaligned[] below */ @@ -298,9 +298,9 @@ FLAC_API FLAC__StreamDecoder *FLAC__stream_decoder_new(void) for(i = 0; i < FLAC__MAX_CHANNELS; i++) FLAC__format_entropy_coding_method_partitioned_rice_contents_init(&decoder->private_->partitioned_rice_contents[i]); -#ifndef COBALT +#ifndef STARBOARD decoder->private_->file = 0; -#endif // COBALT +#endif // STARBOARD set_defaults_(decoder); @@ -438,7 +438,7 @@ FLAC_API FLAC__StreamDecoderInitStatus FLAC__stream_decoder_init_stream( ); } -#ifndef COBALT +#ifndef STARBOARD FLAC_API FLAC__StreamDecoderInitStatus FLAC__stream_decoder_init_ogg_stream( FLAC__StreamDecoder *decoder, FLAC__StreamDecoderReadCallback read_callback, @@ -591,7 +591,7 @@ FLAC_API FLAC__StreamDecoderInitStatus FLAC__stream_decoder_init_ogg_file( { return init_file_internal_(decoder, filename, write_callback, metadata_callback, error_callback, client_data, /*is_ogg=*/true); } -#endif // COBALT +#endif // STARBOARD FLAC_API FLAC__bool FLAC__stream_decoder_finish(FLAC__StreamDecoder *decoder) { @@ -643,13 +643,13 @@ FLAC_API FLAC__bool FLAC__stream_decoder_finish(FLAC__StreamDecoder *decoder) FLAC__ogg_decoder_aspect_finish(&decoder->protected_->ogg_decoder_aspect); #endif -#ifndef COBALT +#ifndef STARBOARD if(0 != decoder->private_->file) { if(decoder->private_->file != stdin) fclose(decoder->private_->file); decoder->private_->file = 0; } -#endif // COBALT +#endif // STARBOARD if(decoder->private_->do_md5_checking) { if(memcmp(decoder->private_->stream_info.data.stream_info.md5sum, decoder->private_->computed_md5sum, 16)) @@ -945,10 +945,10 @@ FLAC_API FLAC__bool FLAC__stream_decoder_reset(FLAC__StreamDecoder *decoder) * not seekable. */ if(!decoder->private_->internal_reset_hack) { -#ifndef COBALT +#ifndef STARBOARD if(decoder->private_->file == stdin) return false; /* can't rewind stdin, reset fails */ -#endif // COBALT +#endif // STARBOARD if(decoder->private_->seek_callback && decoder->private_->seek_callback(decoder, 0, decoder->private_->client_data) == FLAC__STREAM_DECODER_SEEK_STATUS_ERROR) return false; /* seekable and seek fails, reset fails */ } @@ -1231,7 +1231,7 @@ void set_defaults_(FLAC__StreamDecoder *decoder) #endif } -#ifndef COBALT +#ifndef STARBOARD /* * This will forcibly set stdin to binary mode (for OSes that require it) */ @@ -1249,7 +1249,7 @@ FILE *get_binary_stdin_(void) return stdin; } -#endif // COBALT +#endif // STARBOARD FLAC__bool allocate_output_(FLAC__StreamDecoder *decoder, uint32_t size, uint32_t channels, uint32_t bps) { @@ -3632,7 +3632,7 @@ FLAC__bool seek_to_absolute_sample_ogg_(FLAC__StreamDecoder *decoder, FLAC__uint } #endif -#ifndef COBALT +#ifndef STARBOARD FLAC__StreamDecoderReadStatus file_read_callback_(const FLAC__StreamDecoder *decoder, FLAC__byte buffer[], size_t *bytes, void *client_data) { (void)client_data; @@ -3704,4 +3704,4 @@ FLAC__bool file_eof_callback_(const FLAC__StreamDecoder *decoder, void *client_d return feof(decoder->private_->file)? true : false; } -#endif // COBALT +#endif // STARBOARD diff --git a/third_party/flac/src/libFLAC/stream_encoder.c b/third_party/flac/src/libFLAC/stream_encoder.c index d22af57af9d77..f1a808033e45b 100644 --- a/third_party/flac/src/libFLAC/stream_encoder.c +++ b/third_party/flac/src/libFLAC/stream_encoder.c @@ -297,13 +297,13 @@ static FLAC__StreamDecoderWriteStatus verify_write_callback_(const FLAC__StreamD static void verify_metadata_callback_(const FLAC__StreamDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data); static void verify_error_callback_(const FLAC__StreamDecoder *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data); -#ifndef COBALT +#ifndef STARBOARD static FLAC__StreamEncoderReadStatus file_read_callback_(const FLAC__StreamEncoder *encoder, FLAC__byte buffer[], size_t *bytes, void *client_data); static FLAC__StreamEncoderSeekStatus file_seek_callback_(const FLAC__StreamEncoder *encoder, FLAC__uint64 absolute_byte_offset, void *client_data); static FLAC__StreamEncoderTellStatus file_tell_callback_(const FLAC__StreamEncoder *encoder, FLAC__uint64 *absolute_byte_offset, void *client_data); static FLAC__StreamEncoderWriteStatus file_write_callback_(const FLAC__StreamEncoder *encoder, const FLAC__byte buffer[], size_t bytes, uint32_t samples, uint32_t current_frame, void *client_data); static FILE *get_binary_stdout_(void); -#endif // COBALT +#endif // STARBOARD /*********************************************************************** @@ -383,9 +383,9 @@ typedef struct FLAC__StreamEncoderPrivate { FLAC__StreamEncoderProgressCallback progress_callback; void *client_data; uint32_t first_seekpoint_to_check; -#ifndef COBALT +#ifndef STARBOARD FILE *file; /* only used when encoding to a file */ -#endif // COBALT +#endif // STARBOARD FLAC__uint64 bytes_written; FLAC__uint64 samples_written; uint32_t frames_written; @@ -543,9 +543,9 @@ FLAC_API FLAC__StreamEncoder *FLAC__stream_encoder_new(void) return 0; } -#ifndef COBALT +#ifndef STARBOARD encoder->private_->file = 0; -#endif // COBALT +#endif // STARBOARD encoder->protected_->state = FLAC__STREAM_ENCODER_UNINITIALIZED; @@ -1289,7 +1289,7 @@ FLAC_API FLAC__StreamEncoderInitStatus FLAC__stream_encoder_init_stream( ); } -#ifndef COBALT +#ifndef STARBOARD FLAC_API FLAC__StreamEncoderInitStatus FLAC__stream_encoder_init_ogg_stream( FLAC__StreamEncoder *encoder, FLAC__StreamEncoderReadCallback read_callback, @@ -1451,7 +1451,7 @@ FLAC_API FLAC__StreamEncoderInitStatus FLAC__stream_encoder_init_ogg_file( { return init_file_internal_(encoder, filename, progress_callback, client_data, /*is_ogg=*/true); } -#endif // COBALT +#endif // STARBOARD FLAC_API FLAC__bool FLAC__stream_encoder_finish(FLAC__StreamEncoder *encoder) { @@ -1469,13 +1469,13 @@ FLAC_API FLAC__bool FLAC__stream_encoder_finish(FLAC__StreamEncoder *encoder) encoder->protected_->metadata = 0; encoder->protected_->num_metadata_blocks = 0; } -#ifndef COBALT +#ifndef STARBOARD if(0 != encoder->private_->file) { if(encoder->private_->file != stdout) fclose(encoder->private_->file); encoder->private_->file = 0; } -#endif // COBALT +#endif // STARBOARD return true; } @@ -1519,13 +1519,13 @@ FLAC_API FLAC__bool FLAC__stream_encoder_finish(FLAC__StreamEncoder *encoder) } } -#ifndef COBALT +#ifndef STARBOARD if(0 != encoder->private_->file) { if(encoder->private_->file != stdout) fclose(encoder->private_->file); encoder->private_->file = 0; } -#endif // COBALT +#endif // STARBOARD #if FLAC__HAS_OGG if(encoder->private_->is_ogg) @@ -4722,7 +4722,7 @@ void verify_error_callback_(const FLAC__StreamDecoder *decoder, FLAC__StreamDeco encoder->protected_->state = FLAC__STREAM_ENCODER_VERIFY_DECODER_ERROR; } -#ifndef COBALT +#ifndef STARBOARD FLAC__StreamEncoderReadStatus file_read_callback_(const FLAC__StreamEncoder *encoder, FLAC__byte buffer[], size_t *bytes, void *client_data) { (void)client_data; @@ -4824,4 +4824,4 @@ FILE *get_binary_stdout_(void) return stdout; } -#endif // COBALT +#endif // STARBOARD