Fix blocksize for FLAC encoder.
Fix writing uncompressed CHDs via createhd.
This commit is contained in:
parent
b4c36e74e0
commit
a825e9730d
@ -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 bytes_to_write = MIN(sizeof(buffer), delta);
|
||||||
UINT32 count = core_fwrite(m_file, buffer, bytes_to_write);
|
UINT32 count = core_fwrite(m_file, buffer, bytes_to_write);
|
||||||
if (count != length)
|
if (count != bytes_to_write)
|
||||||
throw CHDERR_WRITE_ERROR;
|
throw CHDERR_WRITE_ERROR;
|
||||||
delta -= bytes_to_write;
|
delta -= bytes_to_write;
|
||||||
}
|
}
|
||||||
|
@ -1123,7 +1123,7 @@ chd_flac_compressor::chd_flac_compressor(chd_file &chd, bool lossy, bool bigendi
|
|||||||
// configure the encoder
|
// configure the encoder
|
||||||
m_encoder.set_sample_rate(44100);
|
m_encoder.set_sample_rate(44100);
|
||||||
m_encoder.set_num_channels(2);
|
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);
|
m_encoder.set_strip_metadata(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user