Minor func rename (ffmpeg_make_riff_xma2_from_fmt)

This commit is contained in:
bnnm 2017-01-14 22:25:15 +01:00
parent 7f02c9951d
commit 376b4acbb2
3 changed files with 8 additions and 7 deletions

View File

@ -149,7 +149,7 @@ void seek_ffmpeg(VGMSTREAM *vgmstream, int32_t num_sample);
int ffmpeg_make_riff_atrac3(uint8_t * buf, size_t buf_size, size_t sample_count, size_t data_size, int channels, int sample_rate, int block_align, int joint_stereo, int encoder_delay);
int ffmpeg_make_riff_xma2(uint8_t * buf, size_t buf_size, size_t sample_count, size_t data_size, int channels, int sample_rate, int block_count, int block_size);
int ffmpeg_make_riff_xma2_from_fmt_be(uint8_t * buf, size_t buf_size, off_t fmt_offset, size_t fmt_size, size_t data_size, STREAMFILE *streamFile);
int ffmpeg_make_riff_xma2_from_fmt(uint8_t * buf, size_t buf_size, off_t fmt_offset, size_t fmt_size, size_t data_size, STREAMFILE *streamFile);
#endif

View File

@ -284,7 +284,6 @@ void seek_ffmpeg(VGMSTREAM *vgmstream, int32_t num_sample) {
/* FAKE RIFF HELPERS */
/* ******************************************** */
static int ffmpeg_fmt_chunk_swap_endian(uint8_t * chunk, uint16_t codec);
static int ffmpeg_make_riff_xma2_from_fmt(uint8_t * buf, size_t buf_size, off_t fmt_offset, size_t fmt_size, size_t data_size, STREAMFILE *streamFile, int big_endian);
/**
* Copies a ATRAC3 riff to buf
@ -415,10 +414,12 @@ int ffmpeg_make_riff_xma2(uint8_t * buf, size_t buf_size, size_t sample_count, s
}
int ffmpeg_make_riff_xma2_from_fmt_be(uint8_t * buf, size_t buf_size, off_t fmt_offset, size_t fmt_size, size_t data_size, STREAMFILE *streamFile) {
return ffmpeg_make_riff_xma2_from_fmt(buf, buf_size, fmt_offset, fmt_size, data_size, streamFile, 1);
}
static int ffmpeg_make_riff_xma2_from_fmt(uint8_t * buf, size_t buf_size, off_t fmt_offset, size_t fmt_size, size_t data_size, STREAMFILE *streamFile, int big_endian) {
/**
* Copies a XMA2 riff to buf from a fmt chunk offset
*
* returns number of bytes in buf or -1 when buf is not big enough
*/
int ffmpeg_make_riff_xma2_from_fmt(uint8_t * buf, size_t buf_size, off_t fmt_offset, size_t fmt_size, size_t data_size, STREAMFILE *streamFile, int big_endian) {
size_t riff_size = 4+4+ 4 + 4+4+fmt_size + 4+4;
uint8_t chunk[100];

View File

@ -113,7 +113,7 @@ VGMSTREAM * init_vgmstream_gsp_gsb(STREAMFILE *streamFile) {
if (!find_chunk_be(streamFileGSP, 0x584D4558,first_offset,1, &chunk_offset,NULL)) goto fail; /*"XMEX"*/
/* 0x00: fmt0x166 header (BE), 0x34: seek table */
bytes = ffmpeg_make_riff_xma2_from_fmt_be(buf,200, chunk_offset,0x34, datasize, streamFileGSP);
bytes = ffmpeg_make_riff_xma2_from_fmt(buf,200, chunk_offset,0x34, datasize, streamFileGSP, 1);
if (bytes <= 0) goto fail;
ffmpeg_data = init_ffmpeg_header_offset(streamFile, buf,bytes, start_offset,datasize);