trunk/src/tools/chdman.c
r32793 | r32794 | |
2573 | 2573 | // read the hunk into the buffers |
2574 | 2574 | chd_error err = input_chd.read_hunk(framenum, NULL); |
2575 | 2575 | if (err != CHDERR_NONE) |
2576 | | report_error(1, "Error reading hunk %"I64FMT"d from CHD file (%s): %s\n", framenum, params.find(OPTION_INPUT)->cstr(), chd_file::error_string(err)); |
| 2576 | report_error(1, "Error reading hunk %" I64FMT "d from CHD file (%s): %s\n", framenum, params.find(OPTION_INPUT)->cstr(), chd_file::error_string(err)); |
2577 | 2577 | |
2578 | 2578 | // write audio |
2579 | 2579 | for (int chnum = 0; chnum < channels; chnum++) |
2580 | 2580 | { |
2581 | 2581 | avi_error avierr = avi_append_sound_samples(output_file, chnum, avconfig.audio[chnum], actsamples, 0); |
2582 | 2582 | if (avierr != AVIERR_NONE) |
2583 | | report_error(1, "Error writing samples for hunk %"I64FMT"d to file (%s): %s\n", framenum, output_file_str->cstr(), avi_error_string(avierr)); |
| 2583 | report_error(1, "Error writing samples for hunk %" I64FMT "d to file (%s): %s\n", framenum, output_file_str->cstr(), avi_error_string(avierr)); |
2584 | 2584 | } |
2585 | 2585 | |
2586 | 2586 | // write video |
r32793 | r32794 | |
2588 | 2588 | { |
2589 | 2589 | avi_error avierr = avi_append_video_frame(output_file, fullbitmap); |
2590 | 2590 | if (avierr != AVIERR_NONE) |
2591 | | report_error(1, "Error writing video for hunk %"I64FMT"d to file (%s): %s\n", framenum, output_file_str->cstr(), avi_error_string(avierr)); |
| 2591 | report_error(1, "Error writing video for hunk %" I64FMT "d to file (%s): %s\n", framenum, output_file_str->cstr(), avi_error_string(avierr)); |
2592 | 2592 | } |
2593 | 2593 | } |
2594 | 2594 | |