Fix blocksize for FLAC encoder.

Fix writing uncompressed CHDs via createhd.
This commit is contained in:
Aaron Giles 2012-02-16 18:09:56 +00:00
parent b4c36e74e0
commit a825e9730d
2 changed files with 2 additions and 2 deletions

View File

@ -255,7 +255,7 @@ inline UINT64 chd_file::file_append(const void *source, UINT32 length, UINT32 al
{
UINT32 bytes_to_write = MIN(sizeof(buffer), delta);
UINT32 count = core_fwrite(m_file, buffer, bytes_to_write);
if (count != length)
if (count != bytes_to_write)
throw CHDERR_WRITE_ERROR;
delta -= bytes_to_write;
}

View File

@ -1123,7 +1123,7 @@ chd_flac_compressor::chd_flac_compressor(chd_file &chd, bool lossy, bool bigendi
// configure the encoder
m_encoder.set_sample_rate(44100);
m_encoder.set_num_channels(2);
m_encoder.set_block_size(chd.hunk_bytes());
m_encoder.set_block_size(chd.hunk_bytes() / 4);
m_encoder.set_strip_metadata(true);
}