SDL_mixer: Added support for playing Ogg files using stb_vorbis

From 2b495a2042c25190eef80c13b55b4a5a9bbe12b6 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Fri, 20 May 2022 22:25:07 -0700
Subject: [PATCH] Added support for playing Ogg files using stb_vorbis

Fixes https://github.com/libsdl-org/SDL_mixer/issues/329
---
 CHANGES.txt                                   |    2 +
 README.txt                                    |    4 +-
 Xcode/SDL_mixer.xcodeproj/project.pbxproj     |   66 +-
 Xcode/config.xcconfig                         |    8 -
 .../playmus/playmus.xcodeproj/project.pbxproj |   64 -
 .../playwave.xcodeproj/project.pbxproj        |   64 -
 configure                                     |   53 +-
 configure.ac                                  |    7 +-
 src/codecs/music_ogg.c                        |    2 +-
 src/codecs/music_ogg_stb.c                    |  449 ++
 src/codecs/stb_vorbis/README.txt              |    9 +
 src/codecs/stb_vorbis/stb_vorbis.h            | 5705 +++++++++++++++++
 12 files changed, 6216 insertions(+), 217 deletions(-)
 create mode 100644 src/codecs/music_ogg_stb.c
 create mode 100644 src/codecs/stb_vorbis/README.txt
 create mode 100644 src/codecs/stb_vorbis/stb_vorbis.h

diff --git a/CHANGES.txt b/CHANGES.txt
index b8878913..8a174e54 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,6 @@
 2.0.5:
+Wohlstand - Fri May 20 22:19:38 PDT 2022
+ * Added support for playing Ogg files using stb_vorbis
 Sam Lantinga - Fri May 20 21:59:13 PDT 2022
  * Added support for playing FLAC files using dr_flac
 Sam Lantinga - Fri May 20 20:50:29 PDT 2022
diff --git a/README.txt b/README.txt
index e419cb93..94d75d51 100644
--- a/README.txt
+++ b/README.txt
@@ -5,7 +5,7 @@ The latest version of this library is available from:
 http://www.libsdl.org/projects/SDL_mixer/
 
 Due to popular demand, here is a simple multi-channel audio mixer.
-It supports 8 channels of 16 bit stereo audio, plus a single channel of music. It can load FLAC, MP3, VOC, and WAV format audio. It can also load MIDI, MOD, Ogg, and Opus audio, depending on build options (see the note below for details.)
+It supports 8 channels of 16 bit stereo audio, plus a single channel of music. It can load FLAC, MP3, Ogg, VOC, and WAV format audio. It can also load MIDI, MOD, and Opus audio, depending on build options (see the note below for details.)
 
 See the header file SDL_mixer.h and the examples playwave.c and playmus.c
 for documentation on this mixer library.
@@ -22,7 +22,7 @@ and unpack them in /usr/local/lib under UNIX, and C:\ under Win32.
 This library is under the zlib license, see the file "LICENSE.txt" for details.
 
 Note:
-Support for software MIDI, MOD, Ogg, and Opus are not included by default because of the size of the decode libraries, but you can get them by running external/download.sh
+Support for software MIDI, MOD, and Opus are not included by default because of the size of the decode libraries, but you can get them by running external/download.sh
 - When building with CMake, you can enable the appropriate SUPPORT_* options defined in CMakeLists.txt.
 - When building with configure/make, you can build and install them normally and the configure script will detect and use them.
 - When building with Visual Studio, you will need to build the libraries and then add the appropriate LOAD_* preprocessor define to the Visual Studio project.
diff --git a/Xcode/SDL_mixer.xcodeproj/project.pbxproj b/Xcode/SDL_mixer.xcodeproj/project.pbxproj
index cab41b2d..089237e8 100644
--- a/Xcode/SDL_mixer.xcodeproj/project.pbxproj
+++ b/Xcode/SDL_mixer.xcodeproj/project.pbxproj
@@ -62,6 +62,8 @@
 		F37A8D4F2838A23400C38E95 /* dr_flac.h in Headers */ = {isa = PBXBuildFile; fileRef = F37A8D482838A23400C38E95 /* dr_flac.h */; };
 		F37A8D502838A23400C38E95 /* music_drflac.c in Sources */ = {isa = PBXBuildFile; fileRef = F37A8D492838A23400C38E95 /* music_drflac.c */; };
 		F37A8D512838A23400C38E95 /* music_drflac.c in Sources */ = {isa = PBXBuildFile; fileRef = F37A8D492838A23400C38E95 /* music_drflac.c */; };
+		F37A8DB52838AD1300C38E95 /* music_ogg_stb.c in Sources */ = {isa = PBXBuildFile; fileRef = F37A8DB42838AD1200C38E95 /* music_ogg_stb.c */; };
+		F37A8DB62838AD1300C38E95 /* music_ogg_stb.c in Sources */ = {isa = PBXBuildFile; fileRef = F37A8DB42838AD1200C38E95 /* music_ogg_stb.c */; };
 		F3823337273195CC00F7F527 /* utils.c in Sources */ = {isa = PBXBuildFile; fileRef = 639008C62385A822009019FA /* utils.c */; };
 		F3823338273195CF00F7F527 /* utils.h in Headers */ = {isa = PBXBuildFile; fileRef = 639008C72385A822009019FA /* utils.h */; };
 		F3823339273195D200F7F527 /* effect_position.c in Sources */ = {isa = PBXBuildFile; fileRef = AAE405D01F9607C100EDAF53 /* effect_position.c */; };
@@ -125,13 +127,6 @@
 			remoteGlobalIDString = F3968A21281F704800661875;
 			remoteInfo = opus;
 		};
-		F3968D77281FB66200661875 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = F3968D72281FB66200661875 /* tremor.xcodeproj */;
-			proxyType = 2;
-			remoteGlobalIDString = F3F70F52281F686A005AA27D;
-			remoteInfo = tremor;
-		};
 		F3968DEE281FBFE100661875 /* PBXContainerItemProxy */ = {
 			isa = PBXContainerItemProxy;
 			containerPortal = F3968DEA281FBFE100661875 /* libmodplug.xcodeproj */;
@@ -139,13 +134,6 @@
 			remoteGlobalIDString = F3968D85281FBB1900661875;
 			remoteInfo = libmodplug;
 		};
-		F3F70F9F281F6DCA005AA27D /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = F3F70F9A281F6DCA005AA27D /* vorbis.xcodeproj */;
-			proxyType = 2;
-			remoteGlobalIDString = F3F70EFF281F637A005AA27D;
-			remoteInfo = vorbis;
-		};
 /* End PBXContainerItemProxy section */
 
 /* Begin PBXFileReference section */
@@ -201,15 +189,14 @@
 		F37A8D472838A23400C38E95 /* dr_mp3.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = dr_mp3.h; sourceTree = "<group>"; };
 		F37A8D482838A23400C38E95 /* dr_flac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = dr_flac.h; sourceTree = "<group>"; };
 		F37A8D492838A23400C38E95 /* music_drflac.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = music_drflac.c; sourceTree = "<group>"; };
+		F37A8DB42838AD1200C38E95 /* music_ogg_stb.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = music_ogg_stb.c; sourceTree = "<group>"; };
 		F3968B90281F817E00661875 /* opus.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = opus.xcodeproj; path = opus/opus.xcodeproj; sourceTree = "<group>"; };
 		F3968D71281FB5E100661875 /* config.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = config.xcconfig; sourceTree = "<group>"; };
-		F3968D72281FB66200661875 /* tremor.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = tremor.xcodeproj; path = tremor/tremor.xcodeproj; sourceTree = "<group>"; };
 		F3968DEA281FBFE100661875 /* libmodplug.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = libmodplug.xcodeproj; path = libmodplug/libmodplug.xcodeproj; sourceTree = "<group>"; };
 		F3D87C08281DFABD005DA540 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
 		F3D87C0A281DFAD4005DA540 /* AudioUnit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = System/Library/Frameworks/AudioUnit.framework; sourceTree = SDKROOT; };
 		F3D87C0C281DFADB005DA540 /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = System/Library/Frameworks/CoreServices.framework; sourceTree = SDKROOT; };
 		F3D87C0E281DFB02005DA540 /* SDL2.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SDL2.framework; path = macOS/SDL2.framework; sourceTree = "<group>"; };
-		F3F70F9A281F6DCA005AA27D /* vorbis.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = vorbis.xcodeproj; path = vorbis/vorbis.xcodeproj; sourceTree = "<group>"; };
 		F51BFB0101F724BE01D3D55B /* native_midi.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = native_midi.h; sourceTree = "<group>"; };
 		F59C710300D5CB5801000001 /* ReadMe.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = ReadMe.txt; sourceTree = "<group>"; };
 		F59C710400D5CB5801000001 /* Welcome.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Welcome.txt; sourceTree = "<group>"; };
@@ -264,8 +251,6 @@
 				F3968D71281FB5E100661875 /* config.xcconfig */,
 				F3968DEA281FBFE100661875 /* libmodplug.xcodeproj */,
 				F3968B90281F817E00661875 /* opus.xcodeproj */,
-				F3968D72281FB66200661875 /* tremor.xcodeproj */,
-				F3F70F9A281F6DCA005AA27D /* vorbis.xcodeproj */,
 				F59C70FC00D5CB5801000001 /* pkg-support */,
 				0153844A006D81B07F000001 /* Public Headers */,
 				08FB77ACFE841707C02AAC07 /* Library Source */,
@@ -324,6 +309,7 @@
 				AAE405D31F9607C100EDAF53 /* music_mpg123.h */,
 				AAE405D51F9607C100EDAF53 /* music_nativemidi.c */,
 				AAE405DA1F9607C200EDAF53 /* music_nativemidi.h */,
+				F37A8DB42838AD1200C38E95 /* music_ogg_stb.c */,
 				AAE405D91F9607C200EDAF53 /* music_ogg.c */,
 				AAE405D11F9607C100EDAF53 /* music_ogg.h */,
 				630FBD8220D52105009867AB /* music_opus.c */,
@@ -374,14 +360,6 @@
 			name = Products;
 			sourceTree = "<group>";
 		};
-		F3968D73281FB66200661875 /* Products */ = {
-			isa = PBXGroup;
-			children = (
-				F3968D78281FB66200661875 /* tremor.framework */,
-			);
-			name = Products;
-			sourceTree = "<group>";
-		};
 		F3968DEB281FBFE100661875 /* Products */ = {
 			isa = PBXGroup;
 			children = (
@@ -390,14 +368,6 @@
 			name = Products;
 			sourceTree = "<group>";
 		};
-		F3F70F9B281F6DCA005AA27D /* Products */ = {
-			isa = PBXGroup;
-			children = (
-				F3F70FA0281F6DCA005AA27D /* vorbis.framework */,
-			);
-			name = Products;
-			sourceTree = "<group>";
-		};
 		F51BFAFD01F724BE01D3D55B /* native_midi */ = {
 			isa = PBXGroup;
 			children = (
@@ -581,14 +551,6 @@
 					ProductGroup = F3968B91281F817E00661875 /* Products */;
 					ProjectRef = F3968B90281F817E00661875 /* opus.xcodeproj */;
 				},
-				{
-					ProductGroup = F3968D73281FB66200661875 /* Products */;
-					ProjectRef = F3968D72281FB66200661875 /* tremor.xcodeproj */;
-				},
-				{
-					ProductGroup = F3F70F9B281F6DCA005AA27D /* Products */;
-					ProjectRef = F3F70F9A281F6DCA005AA27D /* vorbis.xcodeproj */;
-				},
 			);
 			projectRoot = "";
 			targets = (
@@ -607,13 +569,6 @@
 			remoteRef = F3968B96281F817E00661875 /* PBXContainerItemProxy */;
 			sourceTree = BUILT_PRODUCTS_DIR;
 		};
-		F3968D78281FB66200661875 /* tremor.framework */ = {
-			isa = PBXReferenceProxy;
-			fileType = wrapper.framework;
-			path = tremor.framework;
-			remoteRef = F3968D77281FB66200661875 /* PBXContainerItemProxy */;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
 		F3968DEF281FBFE100661875 /* libmodplug.framework */ = {
 			isa = PBXReferenceProxy;
 			fileType = wrapper.framework;
@@ -621,13 +576,6 @@
 			remoteRef = F3968DEE281FBFE100661875 /* PBXContainerItemProxy */;
 			sourceTree = BUILT_PRODUCTS_DIR;
 		};
-		F3F70FA0281F6DCA005AA27D /* vorbis.framework */ = {
-			isa = PBXReferenceProxy;
-			fileType = wrapper.framework;
-			path = vorbis.framework;
-			remoteRef = F3F70F9F281F6DCA005AA27D /* PBXContainerItemProxy */;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
 /* End PBXReferenceProxy section */
 
 /* Begin PBXResourcesBuildPhase section */
@@ -699,6 +647,7 @@
 				AAE405F21F9607C300EDAF53 /* effects_internal.c in Sources */,
 				AAE406021F9607C300EDAF53 /* music_cmd.c in Sources */,
 				AAE405FB1F9607C300EDAF53 /* music_timidity.c in Sources */,
+				F37A8DB52838AD1300C38E95 /* music_ogg_stb.c in Sources */,
 				F37A8D502838A23400C38E95 /* music_drflac.c in Sources */,
 				AAE405F11F9607C300EDAF53 /* music.c in Sources */,
 				AAE405F91F9607C300EDAF53 /* music_nativemidi.c in Sources */,
@@ -730,6 +679,7 @@
 				F382334D2731960400F7F527 /* music_modplug.c in Sources */,
 				F382333F273195E100F7F527 /* music.c in Sources */,
 				F382334B2731960000F7F527 /* music_mikmod.c in Sources */,
+				F37A8DB62838AD1300C38E95 /* music_ogg_stb.c in Sources */,
 				F37A8D512838A23400C38E95 /* music_drflac.c in Sources */,
 				F3823341273195E600F7F527 /* mp3utils.c in Sources */,
 				F3823343273195EB00F7F527 /* music_cmd.c in Sources */,
@@ -843,6 +793,8 @@
 				GCC_PREPROCESSOR_DEFINITIONS = (
 					MUSIC_FLAC_DRFLAC,
 					MUSIC_MP3_DRMP3,
+					MUSIC_OGG,
+					OGG_USE_STB,
 					MUSIC_WAV,
 					"$(CONFIG_PREPROCESSOR_DEFINITIONS)",
 				);
@@ -891,6 +843,8 @@
 				GCC_PREPROCESSOR_DEFINITIONS = (
 					MUSIC_FLAC_DRFLAC,
 					MUSIC_MP3_DRMP3,
+					MUSIC_OGG,
+					OGG_USE_STB,
 					MUSIC_WAV,
 					"$(CONFIG_PREPROCESSOR_DEFINITIONS)",
 				);
diff --git a/Xcode/config.xcconfig b/Xcode/config.xcconfig
index 71317d29..86d30410 100644
--- a/Xcode/config.xcconfig
+++ b/Xcode/config.xcconfig
@@ -14,14 +14,6 @@
 //CONFIG_PREPROCESSOR_DEFINITIONS = $(inherited) MUSIC_MOD
 //CONFIG_FRAMEWORK_LDFLAGS = $(inherited) -weak_framework libmodplug
 
-// Uncomment these lines to enable Ogg support
-// If you do this, you should run external/download.sh to download the decode libraries and add vorbis.framework and tremor.framework to your application bundle.
-//CONFIG_PREPROCESSOR_DEFINITIONS = $(inherited) MUSIC_OGG
-//CONFIG_PREPROCESSOR_DEFINITIONS[arch=armv7] = $(inherited) OGG_USE_TREMOR
-//VORBIS_FRAMEWORK = vorbis
-//VORBIS_FRAMEWORK[arch=armv7] = tremor
-//CONFIG_FRAMEWORK_LDFLAGS = $(inherited) -weak_framework $(VORBIS_FRAMEWORK)
-
 // Uncomment these lines to enable Opus support
 // If you do this, you should run external/download.sh to download the decode libraries and add opus.framework to your application bundle.
 //CONFIG_PREPROCESSOR_DEFINITIONS = $(inherited) MUSIC_OPUS
diff --git a/Xcode/playmus/playmus.xcodeproj/project.pbxproj b/Xcode/playmus/playmus.xcodeproj/project.pbxproj
index 3d25b3da..692dc0ab 100644
--- a/Xcode/playmus/playmus.xcodeproj/project.pbxproj
+++ b/Xcode/playmus/playmus.xcodeproj/project.pbxproj
@@ -15,17 +15,13 @@
 		F3968ED128203F5800661875 /* libmodplug.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = F3968E9E282038D700661875 /* libmodplug.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
 		F3968ED328203F5800661875 /* ogg.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = F3968EBC2820390500661875 /* ogg.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
 		F3968ED428203F5800661875 /* opus.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = F3968EAA282038E000661875 /* opus.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
-		F3968ED628203F5800661875 /* vorbis.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = F3968EB6282038FB00661875 /* vorbis.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
 		F3968EEF2820409F00661875 /* SDL2.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = F3968EC0282039AC00661875 /* SDL2.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
 		F3968EF1282040B300661875 /* libmodplug.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = F3968E9E282038D700661875 /* libmodplug.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
 		F3968EF3282040B300661875 /* ogg.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = F3968EBC2820390500661875 /* ogg.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
 		F3968EF4282040B300661875 /* opus.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = F3968EAA282038E000661875 /* opus.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
-		F3968EF5282040B300661875 /* tremor.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = F3968EB0282038F600661875 /* tremor.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
-		F3968EF6282040B300661875 /* vorbis.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = F3968EB6282038FB00661875 /* vorbis.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
 		F3968F0F2820428F00661875 /* libmodplug.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = F3968E9E282038D700661875 /* libmodplug.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
 		F3968F112820428F00661875 /* ogg.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = F3968EBC2820390500661875 /* ogg.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
 		F3968F122820428F00661875 /* opus.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = F3968EAA282038E000661875 /* opus.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
-		F3968F132820428F00661875 /* vorbis.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = F3968EB6282038FB00661875 /* vorbis.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
 		F3968F142820428F00661875 /* SDL2.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = F3968EC2282039BC00661875 /* SDL2.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
 		F39CD44B281DC6C8006CF638 /* SDL2_mixer.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = F3ED80D4281D9ED600C33C5B /* SDL2_mixer.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
 		F3ED80CB281D9ECB00C33C5B /* playmus.c in Sources */ = {isa = PBXBuildFile; fileRef = F3ED80CA281D9ECB00C33C5B /* playmus.c */; };
@@ -54,20 +50,6 @@
 			remoteGlobalIDString = F3968A21281F704800661875;
 			remoteInfo = opus;
 		};
-		F3968EAF282038F600661875 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = F3968EAB282038F600661875 /* tremor.xcodeproj */;
-			proxyType = 2;
-			remoteGlobalIDString = F3F70F52281F686A005AA27D;
-			remoteInfo = tremor;
-		};
-		F3968EB5282038FB00661875 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = F3968EB1282038FB00661875 /* vorbis.xcodeproj */;
-			proxyType = 2;
-			remoteGlobalIDString = F3F70EFF281F637A005AA27D;
-			remoteInfo = vorbis;
-		};
 		F3968EBB2820390500661875 /* PBXContainerItemProxy */ = {
 			isa = PBXContainerItemProxy;
 			containerPortal = F3968EB72820390500661875 /* ogg.xcodeproj */;
@@ -110,7 +92,6 @@
 				F3968F0F2820428F00661875 /* libmodplug.framework in Copy Frameworks */,
 				F3968F112820428F00661875 /* ogg.framework in Copy Frameworks */,
 				F3968F122820428F00661875 /* opus.framework in Copy Frameworks */,
-				F3968F132820428F00661875 /* vorbis.framework in Copy Frameworks */,
 			);
 			name = "Copy Frameworks";
 			runOnlyForDeploymentPostprocessing = 0;
@@ -126,7 +107,6 @@
 				F3968ED128203F5800661875 /* libmodplug.framework in Copy Frameworks */,
 				F3968ED328203F5800661875 /* ogg.framework in Copy Frameworks */,
 				F3968ED428203F5800661875 /* opus.framework in Copy Frameworks */,
-				F3968ED628203F5800661875 /* vorbis.framework in Copy Frameworks */,
 			);
 			name = "Copy Frameworks";
 			runOnlyForDeploymentPostprocessing = 0;
@@ -142,8 +122,6 @@
 				F3968EF1282040B300661875 /* libmodplug.framework in Copy Frameworks */,
 				F3968EF3282040B300661875 /* ogg.framework in Copy Frameworks */,
 				F3968EF4282040B300661875 /* opus.framework in Copy Frameworks */,
-				F3968EF5282040B300661875 /* tremor.framework in Copy Frameworks */,
-				F3968EF6282040B300661875 /* vorbis.framework in Copy Frameworks */,
 			);
 			name = "Copy Frameworks";
 			runOnlyForDeploymentPostprocessing = 0;
@@ -153,8 +131,6 @@
 /* Begin PBXFileReference section */
 		F3968E99282038D700661875 /* libmodplug.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = libmodplug.xcodeproj; path = ../libmodplug/libmodplug.xcodeproj; sourceTree = "<group>"; };
 		F3968EA5282038E000661875 /* opus.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = opus.xcodeproj; path = ../opus/opus.xcodeproj; sourceTree = "<group>"; };
-		F3968EAB282038F600661875 /* tremor.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = tremor.xcodeproj; path = ../tremor/tremor.xcodeproj; sourceTree = "<group>"; };
-		F3968EB1282038FB00661875 /* vorbis.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = vorbis.xcodeproj; path = ../vorbis/vorbis.xcodeproj; sourceTree = "<group>"; };
 		F3968EB72820390500661875 /* ogg.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = ogg.xcodeproj; path = ../ogg/ogg.xcodeproj; sourceTree = "<group>"; };
 		F3968EBE2820392700661875 /* SDL2.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SDL2.framework; path = ../macOS/SDL2.framework; sourceTree = "<group>"; };
 		F3968EC0282039AC00661875 /* SDL2.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SDL2.framework; path = ../iOS/SDL2.framework; sourceTree = "<group>"; };
@@ -215,22 +191,6 @@
 			name = Products;
 			sourceTree = "<group>";
 		};
-		F3968EAC282038F600661875 /* Products */ = {
-			isa = PBXGroup;
-			children = (
-				F3968EB0282038F600661875 /* tremor.framework */,
-			);
-			name = Products;
-			sourceTree = "<group>";
-		};
-		F3968EB2282038FB00661875 /* Products */ = {
-			isa = PBXGroup;
-			children = (
-				F3968EB6282038FB00661875 /* vorbis.framework */,
-			);
-			name = Products;
-			sourceTree = "<group>";
-		};
 		F3968EB82820390500661875 /* Products */ = {
 			isa = PBXGroup;
 			children = (
@@ -279,8 +239,6 @@
 				F3968E99282038D700661875 /* libmodplug.xcodeproj */,
 				F3968EB72820390500661875 /* ogg.xcodeproj */,
 				F3968EA5282038E000661875 /* opus.xcodeproj */,
-				F3968EAB282038F600661875 /* tremor.xcodeproj */,
-				F3968EB1282038FB00661875 /* vorbis.xcodeproj */,
 				F3ED80CD281D9ED600C33C5B /* SDL_mixer.xcodeproj */,
 				F3ED80AB281D9E8800C33C5B /* Shared */,
 				F3ED80BA281D9E8900C33C5B /* macOS */,
@@ -429,14 +387,6 @@
 					ProductGroup = F3ED80CE281D9ED600C33C5B /* Products */;
 					ProjectRef = F3ED80CD281D9ED600C33C5B /* SDL_mixer.xcodeproj */;
 				},
-				{
-					ProductGroup = F3968EAC282038F600661875 /* Products */;
-					ProjectRef = F3968EAB282038F600661875 /* tremor.xcodeproj */;
-				},
-				{
-					ProductGroup = F3968EB2282038FB00661875 /* Products */;
-					ProjectRef = F3968EB1282038FB00661875 /* vorbis.xcodeproj */;
-				},
 			);
 			projectRoot = "";
 			targets = (
@@ -462,20 +412,6 @@
 			remoteRef = F3968EA9282038E000661875 /* PBXContainerItemProxy */;
 			sourceTree = BUILT_PRODUCTS_DIR;
 		};
-		F3968EB0282038F600661875 /* tremor.framework */ = {
-			isa = PBXReferenceProxy;
-			fileType = wrapper.framework;
-			path = tremor.framework;
-			remoteRef = F3968EAF282038F600661875 /* PBXContainerItemProxy */;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
-		F3968EB6282038FB00661875 /* vorbis.framework */ = {
-			isa = PBXReferenceProxy;
-			fileType = wrapper.framework;
-			path = vorbis.framework;
-			remoteRef = F3968EB5282038FB00661875 /* PBXContainerItemProxy */;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
 		F3968EBC2820390500661875 /* ogg.framework */ = {
 			isa = PBXReferenceProxy;
 			fileType = wrapper.framework;
diff --git a/Xcode/playwave/playwave.xcodeproj/project.pbxproj b/Xcode/playwave/playwave.xcodeproj/project.pbxproj
index 5151f08b..34262d8b 100644
--- a/Xcode/playwave/playwave.xcodeproj/project.pbxproj
+++ b/Xcode/playwave/playwave.xcodeproj/project.pbxproj
@@ -15,17 +15,13 @@
 		F3968ED128203F5800661875 /* libmodplug.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = F3968E9E282038D700661875 /* libmodplug.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
 		F3968ED328203F5800661875 /* ogg.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = F3968EBC2820390500661875 /* ogg.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
 		F3968ED428203F5800661875 /* opus.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = F3968EAA282038E000661875 /* opus.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
-		F3968ED628203F5800661875 /* vorbis.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = F3968EB6282038FB00661875 /* vorbis.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
 		F3968EEF2820409F00661875 /* SDL2.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = F3968EC0282039AC00661875 /* SDL2.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
 		F3968EF1282040B300661875 /* libmodplug.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = F3968E9E282038D700661875 /* libmodplug.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
 		F3968EF3282040B300661875 /* ogg.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = F3968EBC2820390500661875 /* ogg.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
 		F3968EF4282040B300661875 /* opus.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = F3968EAA282038E000661875 /* opus.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
-		F3968EF5282040B300661875 /* tremor.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = F3968EB0282038F600661875 /* tremor.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
-		F3968EF6282040B300661875 /* vorbis.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = F3968EB6282038FB00661875 /* vorbis.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
 		F3968F0F2820428F00661875 /* libmodplug.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = F3968E9E282038D700661875 /* libmodplug.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
 		F3968F112820428F00661875 /* ogg.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = F3968EBC2820390500661875 /* ogg.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
 		F3968F122820428F00661875 /* opus.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = F3968EAA282038E000661875 /* opus.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
-		F3968F132820428F00661875 /* vorbis.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = F3968EB6282038FB00661875 /* vorbis.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
 		F3968F142820428F00661875 /* SDL2.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = F3968EC2282039BC00661875 /* SDL2.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
 		F39CD44B281DC6C8006CF638 /* SDL2_mixer.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = F3ED80D4281D9ED600C33C5B /* SDL2_mixer.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
 		F3ED80CB281D9ECB00C33C5B /* playwave.c in Sources */ = {isa = PBXBuildFile; fileRef = F3ED80CA281D9ECB00C33C5B /* playwave.c */; };
@@ -54,20 +50,6 @@
 			remoteGlobalIDString = F3968A21281F704800661875;
 			remoteInfo = opus;
 		};
-		F3968EAF282038F600661875 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = F3968EAB282038F600661875 /* tremor.xcodeproj */;
-			proxyType = 2;
-			remoteGlobalIDString = F3F70F52281F686A005AA27D;
-			remoteInfo = tremor;
-		};
-		F3968EB5282038FB00661875 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = F3968EB1282038FB00661875 /* vorbis.xcodeproj */;
-			proxyType = 2;
-			remoteGlobalIDString = F3F70EFF281F637A005AA27D;
-			remoteInfo = vorbis;
-		};
 		F3968EBB2820390500661875 /* PBXContainerItemProxy */ = {
 			isa = PBXContainerItemProxy;
 			containerPortal = F3968EB72820390500661875 /* ogg.xcodeproj */;
@@ -110,7 +92,6 @@
 				F3968F0F2820428F00661875 /* libmodplug.framework in Copy Frameworks */,
 				F3968F112820428F00661875 /* ogg.framework in Copy Frameworks */,
 				F3968F122820428F00661875 /* opus.framework in Copy Frameworks */,
-				F3968F132820428F00661875 /* vorbis.framework in Copy Frameworks */,
 			);
 			name = "Copy Frameworks";
 			runOnlyForDeploymentPostprocessing = 0;
@@ -126,7 +107,6 @@
 				F3968ED128203F5800661875 /* libmodplug.framework in Copy Frameworks */,
 				F3968ED328203F5800661875 /* ogg.framework in Copy Frameworks */,
 				F3968ED428203F5800661875 /* opus.framework in Copy Frameworks */,
-				F3968ED628203F5800661875 /* vorbis.framework in Copy Frameworks */,
 			);
 			name = "Copy Frameworks";
 			runOnlyForDeploymentPostprocessing = 0;
@@ -142,8 +122,6 @@
 				F3968EF1282040B300661875 /* libmodplug.framework in Copy Frameworks */,
 				F3968EF3282040B300661875 /* ogg.framework in Copy Frameworks */,
 				F3968EF4282040B300661875 /* opus.framework in Copy Frameworks */,
-				F3968EF5282040B300661875 /* tremor.framework in Copy Frameworks */,
-				F3968EF6282040B300661875 /* vorbis.framework in Copy Frameworks */,
 			);
 			name = "Copy Frameworks";
 			runOnlyForDeploymentPostprocessing = 0;
@@ -153,8 +131,6 @@
 /* Begin PBXFileReference section */
 		F3968E99282038D700661875 /* libmodplug.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = libmodplug.xcodeproj; path = ../libmodplug/libmodplug.xcodeproj; sourceTree = "<group>"; };
 		F3968EA5282038E000661875 /* opus.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = opus.xcodeproj; path = ../opus/opus.xcodeproj; sourceTree = "<group>"; };
-		F3968EAB282038F600661875 /* tremor.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = tremor.xcodeproj; path = ../tremor/tremor.xcodeproj; sourceTree = "<group>"; };
-		F3968EB1282038FB00661875 /* vorbis.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = vorbis.xcodeproj; path = ../vorbis/vorbis.xcodeproj; sourceTree = "<group>"; };
 		F3968EB72820390500661875 /* ogg.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = ogg.xcodeproj; path = ../ogg/ogg.xcodeproj; sourceTree = "<group>"; };
 		F3968EBE2820392700661875 /* SDL2.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SDL2.framework; path = ../macOS/SDL2.framework; sourceTree = "<group>"; };
 		F3968EC0282039AC00661875 /* SDL2.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SDL2.framework; path = ../iOS/SDL2.framework; sourceTree = "<group>"; };
@@ -215,22 +191,6 @@
 			name = Products;
 			sourceTree = "<group>";
 		};
-		F3968EAC282038F600661875 /* Products */ = {
-			isa = PBXGroup;
-			children = (
-				F3968EB0282038F600661875 /* tremor.

(Patch may be truncated, please check the link at the top of this post.)