diff --git a/src/coding/vorbis_custom_utils_fsb.c b/src/coding/vorbis_custom_utils_fsb.c index 3198da0c..a8fd60f6 100644 --- a/src/coding/vorbis_custom_utils_fsb.c +++ b/src/coding/vorbis_custom_utils_fsb.c @@ -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) { 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); if (bytes) return bytes; @@ -155,11 +160,6 @@ static int build_header_setup(uint8_t * buf, size_t bufsize, uint32_t setup_id, if (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 */ VGM_LOG("FSB Vorbis: setup_id %08x not found\n", setup_id); return 0; diff --git a/src/coding/vorbis_custom_utils_wwise.c b/src/coding/vorbis_custom_utils_wwise.c index 8ff3c1d2..8ddafb51 100644 --- a/src/coding/vorbis_custom_utils_wwise.c +++ b/src/coding/vorbis_custom_utils_wwise.c @@ -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) { size_t bytes; - /* try to load from external file (ignoring type, just use file if found) */ - bytes = load_wvc_file(ibuf, ibufsize, codebook_id, streamFile); + /* try to locate from the precompiled list */ + bytes = load_wvc_array(ibuf, ibufsize, codebook_id, setup_type); if (bytes) return bytes; - /* try to locate from the precompiled list */ - bytes = load_wvc_array(ibuf, ibufsize, codebook_id, setup_type); + /* try to load from external file (ignoring type, just use file if found) */ + bytes = load_wvc_file(ibuf, ibufsize, codebook_id, streamFile); if (bytes) return bytes;