From 0e4ee632b976794a54cbeb70a3241647ef5eb262 Mon Sep 17 00:00:00 2001 From: bnnm Date: Sat, 22 Sep 2018 16:32:21 +0200 Subject: [PATCH] Remove standard G.722.1 (Siren7), since no game uses it Siren14 wasn't affected by this --- README.md | 1 - doc/BUILD.md | 8 ++++---- src/formats.c | 1 - src/vgmstream.c | 12 +++--------- src/vgmstream.h | 1 - 5 files changed, 7 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 277bd9d7..19ec4d78 100644 --- a/README.md +++ b/README.md @@ -229,7 +229,6 @@ are used in few games. - CRI HCA - Xiph Vorbis (Ogg, FSB5, Wwise, OGL, Silicon Knights) - MPEG MP1/2/3 (standard, AHX, XVAG, FSB, AWC, P3D, etc) -- ITU-T G.722.1 (Polycom Siren 7) - ITU-T G.722.1 annex C (Polycom Siren 14) - ITU G.719 annex B (Polycom Siren 22) - Electronic Arts EALayer3 diff --git a/doc/BUILD.md b/doc/BUILD.md index 05c45ab5..bb87a776 100644 --- a/doc/BUILD.md +++ b/doc/BUILD.md @@ -172,7 +172,7 @@ Must use autotools (sh configure, make, make install), though some scripts simpl ### libg7221_decode -Adds support for ITU-T G.722.1 and G.722.1 annex C (standardization of Polycom Siren 7/14). +Adds support for ITU-T G.722.1 annex C (standardization of Polycom Siren 14). - Source: https://github.com/kode54/libg7221_decode - DLL: `libg7221_decode.dll` @@ -203,14 +203,14 @@ Adds support for ATRAC9. - Source: https://github.com/Thealexbarney/LibAtrac9 - DLL: `libatrac9.dll` -Use MSCV and `libatrac9.sln`. +Use MSCV and `libatrac9.sln`, or GCC and the Makefile included. ### libcelt Adds support for FSB CELT versions 0.6.1 and 0.11.0. -- DLL: `libcelt-0061.dll`, `libcelt-0110.dll` - Source (0.6.1): http://downloads.us.xiph.org/releases/celt/celt-0.6.1.tar.gz - Source (0.11.0): http://downloads.xiph.org/releases/celt/celt-0.11.0.tar.gz +- DLL: `libcelt-0061.dll`, `libcelt-0110.dll` FSB uses two incompatible, older libcelt versions. Both libraries export the same symbols so normally can't coexist together. To get them working we need to make sure symbols are renamed first. This may be solved in various ways: - using dynamic loading (LoadLibrary) but for portability it isn't an option @@ -219,7 +219,7 @@ FSB uses two incompatible, older libcelt versions. Both libraries export the sam - Use GCC's preprocessor to rename functions on compile - Rename functions in the source code directly. -To compile we use autotools with GCC preprocessor renaming: +To compile we'll use autotools with GCC preprocessor renaming: - in the celt-0.6.1 dir: ``` # creates Makefiles with Automake diff --git a/src/formats.c b/src/formats.c index 6d318714..072f7065 100644 --- a/src/formats.c +++ b/src/formats.c @@ -603,7 +603,6 @@ static const coding_info coding_info_list[] = { {coding_MPEG_layer3, "MPEG Layer III Audio (MP3)"}, #endif #ifdef VGM_USE_G7221 - {coding_G7221, "ITU G.722.1 (Polycom Siren 7)"}, {coding_G7221C, "ITU G.722.1 annex C (Polycom Siren 14)"}, #endif #ifdef VGM_USE_G719 diff --git a/src/vgmstream.c b/src/vgmstream.c index d1cf7a93..9727c5b7 100644 --- a/src/vgmstream.c +++ b/src/vgmstream.c @@ -597,8 +597,7 @@ void reset_vgmstream(VGMSTREAM * vgmstream) { #endif #ifdef VGM_USE_G7221 - if (vgmstream->coding_type==coding_G7221 || - vgmstream->coding_type==coding_G7221C) { + if (vgmstream->coding_type==coding_G7221C) { reset_g7221(vgmstream); } #endif @@ -781,8 +780,7 @@ void close_vgmstream(VGMSTREAM * vgmstream) { #endif #ifdef VGM_USE_G7221 - if (vgmstream->coding_type == coding_G7221 || - vgmstream->coding_type == coding_G7221C) { + if (vgmstream->coding_type == coding_G7221C) { free_g7221(vgmstream); vgmstream->codec_data = NULL; } @@ -1193,9 +1191,7 @@ int get_vgmstream_samples_per_frame(VGMSTREAM * vgmstream) { #ifdef VGM_USE_G7221 case coding_G7221C: - return 32000/50; - case coding_G7221: - return 16000/50; + return 32000/50; /* Siren7: 16000/50 */ #endif #ifdef VGM_USE_G719 case coding_G719: @@ -1371,7 +1367,6 @@ int get_vgmstream_frame_size(VGMSTREAM * vgmstream) { #ifdef VGM_USE_G7221 case coding_G7221C: - case coding_G7221: #endif #ifdef VGM_USE_G719 case coding_G719: @@ -1846,7 +1841,6 @@ void decode_vgmstream(VGMSTREAM * vgmstream, int samples_written, int samples_to break; #endif #ifdef VGM_USE_G7221 - case coding_G7221: case coding_G7221C: for (ch = 0; ch < vgmstream->channels; ch++) { decode_g7221(vgmstream, buffer+samples_written*vgmstream->channels+ch, diff --git a/src/vgmstream.h b/src/vgmstream.h index 210818c9..94a63e29 100644 --- a/src/vgmstream.h +++ b/src/vgmstream.h @@ -177,7 +177,6 @@ typedef enum { #endif #ifdef VGM_USE_G7221 - coding_G7221, /* ITU G.722.1 (Polycom Siren 7) */ coding_G7221C, /* ITU G.722.1 annex C (Polycom Siren 14) */ #endif