Load Vorbis setup in fsb/wwise from array first, as it's most common

This commit is contained in:
bnnm 2018-04-15 01:16:45 +02:00
parent 12cba40baf
commit 6e900315ab
2 changed files with 10 additions and 10 deletions

View File

@ -146,7 +146,12 @@ static int build_header_comment(uint8_t * buf, size_t bufsize) {
static int build_header_setup(uint8_t * buf, size_t bufsize, uint32_t setup_id, STREAMFILE *streamFile) { static int build_header_setup(uint8_t * buf, size_t bufsize, uint32_t setup_id, STREAMFILE *streamFile) {
int bytes; int bytes;
/* try to load from external files first */ /* try to locate from the precompiled list */
bytes = load_fvs_array(buf, bufsize, setup_id, streamFile);
if (bytes)
return bytes;
/* try to load from external files */
bytes = load_fvs_file_single(buf, bufsize, setup_id, streamFile); bytes = load_fvs_file_single(buf, bufsize, setup_id, streamFile);
if (bytes) if (bytes)
return bytes; return bytes;
@ -155,11 +160,6 @@ static int build_header_setup(uint8_t * buf, size_t bufsize, uint32_t setup_id,
if (bytes) if (bytes)
return bytes; return bytes;
/* try to locate from the precompiled list */
bytes = load_fvs_array(buf, bufsize, setup_id, streamFile);
if (bytes)
return bytes;
/* not found */ /* not found */
VGM_LOG("FSB Vorbis: setup_id %08x not found\n", setup_id); VGM_LOG("FSB Vorbis: setup_id %08x not found\n", setup_id);
return 0; return 0;

View File

@ -1098,13 +1098,13 @@ static unsigned int ww2ogg_tremor_book_maptype1_quantvals(unsigned int entries,
static int load_wvc(uint8_t * ibuf, size_t ibufsize, uint32_t codebook_id, wwise_setup_t setup_type, STREAMFILE *streamFile) { static int load_wvc(uint8_t * ibuf, size_t ibufsize, uint32_t codebook_id, wwise_setup_t setup_type, STREAMFILE *streamFile) {
size_t bytes; size_t bytes;
/* try to load from external file (ignoring type, just use file if found) */ /* try to locate from the precompiled list */
bytes = load_wvc_file(ibuf, ibufsize, codebook_id, streamFile); bytes = load_wvc_array(ibuf, ibufsize, codebook_id, setup_type);
if (bytes) if (bytes)
return bytes; return bytes;
/* try to locate from the precompiled list */ /* try to load from external file (ignoring type, just use file if found) */
bytes = load_wvc_array(ibuf, ibufsize, codebook_id, setup_type); bytes = load_wvc_file(ibuf, ibufsize, codebook_id, streamFile);
if (bytes) if (bytes)
return bytes; return bytes;