Skip to content

Xbox Cloud Gaming app for PS5 Homebrew

C

build(audio): add libSceAudioIn link stub and enable Opus encoder in FFmpeg

Rafael Abud Ferreira8ae169e8f6e0
diff --git a/ps5/stubs/libSceAudioIn.c b/ps5/stubs/libSceAudioIn.c
new file mode 100644
index 0000000..2d4173c
--- /dev/null
+++ b/ps5/stubs/libSceAudioIn.c
@@ -0,0 +1,31 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 RafaelNGP
+/* Host-link only: names the module's exports so the native-app converter
+ * records the imports. Never packaged or executed. */
+
+int sceAudioInInit(void) { return -1; }
+
+int sceAudioInOpen(int userId, int type, int index, unsigned int len, unsigned int freq, unsigned int param) {
+ (void)userId; (void)type; (void)index; (void)len; (void)freq; (void)param;
+ return -1;
+}
+
+int sceAudioInInput(int handle, void *dest) {
+ (void)handle; (void)dest;
+ return -1;
+}
+
+int sceAudioInClose(int handle) {
+ (void)handle;
+ return -1;
+}
+
+int sceAudioInGetStatus(int handle, unsigned int *status) {
+ (void)handle; (void)status;
+ return -1;
+}
+
+int sceAudioInSetGain(int handle, int gain) {
+ (void)handle; (void)gain;
+ return -1;
+}
diff --git a/tools/build-ffmpeg.sh b/tools/build-ffmpeg.sh
index 1ba872d..9a4cb1a 100755
--- a/tools/build-ffmpeg.sh
+++ b/tools/build-ffmpeg.sh
@@ -26,7 +26,7 @@ common=(
--disable-programs --disable-doc --disable-network --disable-autodetect
--disable-everything --disable-avdevice --disable-avformat --disable-avfilter
--disable-swscale --disable-postproc
- --enable-decoder=h264,opus --enable-parser=h264,opus
+ --enable-decoder=h264,opus --enable-encoder=opus --enable-parser=h264,opus
# (the Opus decoder needs libswresample)
--disable-debug
)