diff options
author | Josh Coalson <jcoalson@users.sourceforce.net> | 2007-09-12 03:01:17 +0000 |
---|---|---|
committer | Josh Coalson <jcoalson@users.sourceforce.net> | 2007-09-12 03:01:17 +0000 |
commit | 6d6afdce3e02516e0d7e4beab90a8b131e6965f1 (patch) | |
tree | 67133131d25163ab3efdcc6d7200b36216cb2873 /examples/c/decode/file/main.c | |
parent | 9fbcdcd1a987ab349a5edd725343a00b9f73b918 (diff) | |
download | flac-6d6afdce3e02516e0d7e4beab90a8b131e6965f1.tar.gz |
msvc fixes
Diffstat (limited to 'examples/c/decode/file/main.c')
-rw-r--r-- | examples/c/decode/file/main.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/c/decode/file/main.c b/examples/c/decode/file/main.c index 82d56c30..6448ba5d 100644 --- a/examples/c/decode/file/main.c +++ b/examples/c/decode/file/main.c @@ -128,11 +128,11 @@ FLAC__StreamDecoderWriteStatus write_callback(const FLAC__StreamDecoder *decoder fwrite("WAVEfmt ", 1, 8, f) < 8 || !write_little_endian_uint32(f, 16) || !write_little_endian_uint16(f, 1) || - !write_little_endian_uint16(f, channels) || + !write_little_endian_uint16(f, (FLAC__uint16)channels) || !write_little_endian_uint32(f, sample_rate) || !write_little_endian_uint32(f, sample_rate * channels * (bps/8)) || - !write_little_endian_uint16(f, channels * (bps/8)) || /* block align */ - !write_little_endian_uint16(f, bps) || + !write_little_endian_uint16(f, (FLAC__uint16)(channels * (bps/8))) || /* block align */ + !write_little_endian_uint16(f, (FLAC__uint16)bps) || fwrite("data", 1, 4, f) < 4 || !write_little_endian_uint32(f, total_size) ) { @@ -144,8 +144,8 @@ FLAC__StreamDecoderWriteStatus write_callback(const FLAC__StreamDecoder *decoder /* write decoded PCM samples */ for(i = 0; i < frame->header.blocksize; i++) { if( - !write_little_endian_int16(f, buffer[0][i]) || /* left channel */ - !write_little_endian_int16(f, buffer[1][i]) /* right channel */ + !write_little_endian_int16(f, (FLAC__int16)buffer[0][i]) || /* left channel */ + !write_little_endian_int16(f, (FLAC__int16)buffer[1][i]) /* right channel */ ) { fprintf(stderr, "ERROR: write error\n"); return FLAC__STREAM_DECODER_WRITE_STATUS_ABORT; |