mirror of
https://github.com/claunia/flac.git
synced 2025-12-16 18:54:26 +00:00
minor syntax
This commit is contained in:
@@ -782,7 +782,7 @@ FLAC__StreamDecoderWriteStatus write_callback(const void *decoder, const FLAC__F
|
|||||||
const FLAC__uint64 input_samples_passed = skip + decoder_session->samples_processed;
|
const FLAC__uint64 input_samples_passed = skip + decoder_session->samples_processed;
|
||||||
FLAC__ASSERT(until >= input_samples_passed);
|
FLAC__ASSERT(until >= input_samples_passed);
|
||||||
if(input_samples_passed + wide_samples > until)
|
if(input_samples_passed + wide_samples > until)
|
||||||
wide_samples = until - input_samples_passed;
|
wide_samples = (unsigned)(until - input_samples_passed);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(wide_samples > 0) {
|
if(wide_samples > 0) {
|
||||||
@@ -994,7 +994,7 @@ void metadata_callback(const void *decoder, const FLAC__StreamMetadata *metadata
|
|||||||
decoder_session->abort_flag = true;
|
decoder_session->abort_flag = true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
const FLAC__uint32 aligned_data_size = (data_size+1) & (~1U);
|
const FLAC__uint32 aligned_data_size = (FLAC__uint32)((data_size+1) & (~1U));
|
||||||
|
|
||||||
if(flac__utils_fwrite("FORM", 1, 4, decoder_session->fout) != 4)
|
if(flac__utils_fwrite("FORM", 1, 4, decoder_session->fout) != 4)
|
||||||
decoder_session->abort_flag = true;
|
decoder_session->abort_flag = true;
|
||||||
@@ -1017,7 +1017,7 @@ void metadata_callback(const void *decoder, const FLAC__StreamMetadata *metadata
|
|||||||
if(decoder_session->wave_chunk_size_fixup.needs_fixup)
|
if(decoder_session->wave_chunk_size_fixup.needs_fixup)
|
||||||
decoder_session->wave_chunk_size_fixup.frames_offset = ftell(decoder_session->fout);
|
decoder_session->wave_chunk_size_fixup.frames_offset = ftell(decoder_session->fout);
|
||||||
|
|
||||||
if(!write_big_endian_uint32(decoder_session->fout, decoder_session->total_samples))
|
if(!write_big_endian_uint32(decoder_session->fout, (FLAC__uint32)decoder_session->total_samples))
|
||||||
decoder_session->abort_flag = true;
|
decoder_session->abort_flag = true;
|
||||||
|
|
||||||
if(!write_big_endian_uint16(decoder_session->fout, (FLAC__uint16)(decoder_session->bps)))
|
if(!write_big_endian_uint16(decoder_session->fout, (FLAC__uint16)(decoder_session->bps)))
|
||||||
|
|||||||
@@ -540,7 +540,7 @@ void grabbag__cuesheet_emit(FILE *file, const FLAC__StreamMetadata *cuesheet, co
|
|||||||
|
|
||||||
fprintf(file, " INDEX %02u ", (unsigned)index->number);
|
fprintf(file, " INDEX %02u ", (unsigned)index->number);
|
||||||
if(cs->is_cd) {
|
if(cs->is_cd) {
|
||||||
const unsigned logical_frame = (track->offset + index->offset) / (44100 / 75);
|
const unsigned logical_frame = (unsigned)((track->offset + index->offset) / (44100 / 75));
|
||||||
unsigned m, s, f;
|
unsigned m, s, f;
|
||||||
grabbag__cuesheet_frame_to_msf(logical_frame, &m, &s, &f);
|
grabbag__cuesheet_frame_to_msf(logical_frame, &m, &s, &f);
|
||||||
fprintf(file, "%02u:%02u:%02u\n", m, s, f);
|
fprintf(file, "%02u:%02u:%02u\n", m, s, f);
|
||||||
|
|||||||
@@ -576,7 +576,7 @@ static FLAC__bool generate_aiff(const char *filename, unsigned sample_rate, unsi
|
|||||||
goto foo;
|
goto foo;
|
||||||
if(fwrite("AIFFCOMM\000\000\000\022", 1, 12, f) < 12)
|
if(fwrite("AIFFCOMM\000\000\000\022", 1, 12, f) < 12)
|
||||||
goto foo;
|
goto foo;
|
||||||
if(!write_big_endian_uint16(f, channels))
|
if(!write_big_endian_uint16(f, (FLAC__uint16)channels))
|
||||||
goto foo;
|
goto foo;
|
||||||
if(!write_big_endian_uint32(f, samples))
|
if(!write_big_endian_uint32(f, samples))
|
||||||
goto foo;
|
goto foo;
|
||||||
@@ -619,7 +619,7 @@ static FLAC__bool generate_wav(const char *filename, unsigned sample_rate, unsig
|
|||||||
goto foo;
|
goto foo;
|
||||||
if(fwrite("WAVEfmt \020\000\000\000\001\000", 1, 14, f) < 14)
|
if(fwrite("WAVEfmt \020\000\000\000\001\000", 1, 14, f) < 14)
|
||||||
goto foo;
|
goto foo;
|
||||||
if(!write_little_endian_uint16(f, channels))
|
if(!write_little_endian_uint16(f, (FLAC__uint16)channels))
|
||||||
goto foo;
|
goto foo;
|
||||||
if(!write_little_endian_uint32(f, sample_rate))
|
if(!write_little_endian_uint32(f, sample_rate))
|
||||||
goto foo;
|
goto foo;
|
||||||
|
|||||||
Reference in New Issue
Block a user