diff options
author | Angelo Salese <angelosa@users.noreply.github.com> | 2012-02-26 14:31:24 +0000 |
---|---|---|
committer | Angelo Salese <angelosa@users.noreply.github.com> | 2012-02-26 14:31:24 +0000 |
commit | 04145d0b62c911baab05a57e31201f3e33d73b86 (patch) | |
tree | ca6ff2ca4ac4cc1119778d0f5f8810958b165f70 /src/tools | |
parent | b46b9de8c89d233159d8f83d91de869de5af3296 (diff) |
Clean-ups and version bumpmame0145u2
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/chdman.c | 6 | ||||
-rw-r--r-- | src/tools/ldresample.c | 8 | ||||
-rw-r--r-- | src/tools/ldverify.c | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/src/tools/chdman.c b/src/tools/chdman.c index 3433faa16d7..bea8f1a796d 100644 --- a/src/tools/chdman.c +++ b/src/tools/chdman.c @@ -2619,18 +2619,18 @@ static void do_dump_metadata(parameters_t ¶ms) file_error filerr = core_fopen(*output_file_str, OPEN_FLAG_WRITE | OPEN_FLAG_CREATE, &output_file); if (filerr != FILERR_NONE) report_error(1, "Unable to open file (%s)", output_file_str->cstr()); - + // output the metadata UINT32 count = core_fwrite(output_file, buffer, buffer.count()); if (count != buffer.count()) report_error(1, "Error writing file (%s)", output_file_str->cstr()); core_fclose(output_file); - + // provide some feedback astring tempstr; printf("File (%s) written, %s bytes\n", output_file_str->cstr(), big_int_string(tempstr, buffer.count())); } - + // flush to stdout else { diff --git a/src/tools/ldresample.c b/src/tools/ldresample.c index a3b11159726..9565fc51113 100644 --- a/src/tools/ldresample.c +++ b/src/tools/ldresample.c @@ -82,7 +82,7 @@ struct movie_info int samplerate; int channels; int interlaced; - bitmap_yuy16 bitmap; + bitmap_yuy16 bitmap; dynamic_array<INT16> lsound; dynamic_array<INT16> rsound; UINT32 samples; @@ -106,7 +106,7 @@ public: { assert(offset % m_source.hunk_bytes() == 0); assert(length % m_source.hunk_bytes() == 0); - + UINT32 startfield = offset / m_source.hunk_bytes(); UINT32 endfield = startfield + length / m_source.hunk_bytes(); UINT8 *dest = reinterpret_cast<UINT8 *>(_dest); @@ -451,7 +451,7 @@ void chd_resample_compressor::generate_one_frame(UINT8 *dest, UINT32 datasize, U dstbeginfield = -1 - sample_number_to_field(m_info, -dstbegin >> 24, dstbeginoffset); dstbeginoffset = (field_to_sample_number(m_info, -dstbeginfield) - field_to_sample_number(m_info, -dstbeginfield - 1)) - dstbeginoffset; } - + // determine the last field needed to cover this range of samples UINT32 srcend = field_to_sample_number(m_info, fieldnum + 1); INT64 dstend = (INT64(srcend) << 24) + m_ioffset + m_islope * (fieldnum + 1); @@ -498,7 +498,7 @@ printf("%5d: start=%10d (%5d.%03d) end=%10d (%5d.%03d)\n", // read the original frame, pointing the sound buffer past where we've calculated read_chd(m_source, fieldnum, m_info, srcend - srcbegin); - + // assemble the final frame dynamic_buffer buffer; INT16 *sampledata[2] = { m_info.lsound, m_info.rsound }; diff --git a/src/tools/ldverify.c b/src/tools/ldverify.c index e974be533c3..c2cf6b08e32 100644 --- a/src/tools/ldverify.c +++ b/src/tools/ldverify.c @@ -256,7 +256,7 @@ static void *open_chd(const char *filename, movie_info &info) static int read_chd(void *file, int frame, bitmap_yuy16 &bitmap, INT16 *lsound, INT16 *rsound, int &samples) { chd_file *chdfile = reinterpret_cast<chd_file *>(file); - + // loop over fields int interlace_factor = chdinterlaced ? 2 : 1; samples = 0; |