openal-soft icon indicating copy to clipboard operation
openal-soft copied to clipboard

[Android] Video recording -> no audio?

Open RusJJ opened this issue 2 years ago • 4 comments

Hi! Im using OpenAL Soft as a replacement for GTA:SA on Android to get more benefits such as performance.

This is my config:

#define FORCE_ALIGN

#define HAVE_POSIX_MEMALIGN
#define HAVE_OBOE
#define HAVE_DLFCN_H
#define HAVE_MALLOC_H
#define HAVE_PTHREAD_SETSCHEDPARAM
#define HAVE_PTHREAD_SETNAME_NP
#define HAVE_NEON
#define HAVE_GETOPT
#define HAVE_GCC_GET_CPUID
#define HAVE_CPUID_INTRINSIC
#define HAVE__ALIGNED_MALLOC

Btw, when my users record a video of them playing, they NEVER have an audio recorded. Ideas?

RusJJ avatar Jul 14 '23 09:07 RusJJ

Is that config made manually? Android shouldn't have HAVE_GCC_GET_CPUID (GNU's get_cpuid function wrapper for the x86 cpuid instruction, which ARM doesn't have), HAVE_CPUID_INTRINSIC (MSVC's equivalent) or HAVE__ALIGNED_MALLOC (Windows' _aligned_malloc function). I'd recommend letting CMake generate the build files normally, so it's built properly.

Given that it's building and otherwise running though, I'm not familiar with audio recording on Android, so I can't say why the audio wouldn't be recorded. If I were to guess, I see the config enables the Oboe backend and not OpenSL. Presuming GTA:SA uses an older version of OpenAL that doesn't use Oboe, it could be something to do with how Oboe handles output compared to OpenSL that causes the audio to not get recorded.

kcat avatar Jul 15 '23 01:07 kcat

Is that config made manually?

It is. I will remove those 3, ty for noticing me. Should i try to open an issue in Oboe's repo?

RusJJ avatar Jul 15 '23 14:07 RusJJ

It may be worth checking to see if it still happens with the OpenSL backend. If it does, maybe the app is doing something to prevent the audio from being recorded. Checking other apps with the Oboe backend would be useful too, to determine if it's a more general Oboe-related issue or only that specific app.

kcat avatar Jul 15 '23 21:07 kcat

Seems like that's my other problem with Oboe and bluetooth devices. Looks like it starts working when i use alcResetDeviceSOFT mid-recording

RusJJ avatar Aug 07 '23 08:08 RusJJ