가능한 한 짧은 대기 시간으로 Linux 상자에서 Android 장치로 오디오를 스트리밍하고 싶기 때문에 PulseAudio를 module-opensl-sink
다음 과 함께 사용하는 것에 대해 생각했습니다.여기). 나기분이 안 좋아효과 API를 사용하고 싶기 때문에 AudioFlinger를 PA로 교체합니다.
Google의 Android NDK를 사용하여 어떻게든 PulseAudio를 컴파일했지만 실행하려고 할 때마다 어떤 모듈을 로드하려고 하든 오류가 발생합니다.
$ ./pulseaudio -C --loglevel=4
W: [pulseaudio] caps.c: Normally all extra capabilities would be dropped now, but that's impossible because PulseAudio was built without capabilities support.
I: [pulseaudio] main.c: setrlimit(RLIMIT_RTPRIO, (9, 9)) failed: Operation not permitted
D: [pulseaudio] core-util.c: setpriority() worked.
I: [pulseaudio] core-util.c: Successfully gained nice level -11.
I: [pulseaudio] main.c: This is PulseAudio 5.0-121-g38c5d-dirty
D: [pulseaudio] main.c: Compilation host: arm-unknown-linux-androideabi
D: [pulseaudio] main.c: Compilation CFLAGS: -mfpu=neon -mfloat-abi=softfp -Wall -W -Wextra -pipe -Wno-long-long -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing -Wwrite-strings -Wno-unused-parameter -ffast-math -fno-common -fdiagnostics-show-option
D: [pulseaudio] main.c: Running on host: Linux armv7l 3.4.0-cyanogenmod-g8a32cd7 #1 SMP PREEMPT Sun Jun 8 19:40:15 PDT 2014
D: [pulseaudio] main.c: Found 4 CPUs.
I: [pulseaudio] main.c: Page size is 4096 bytes
D: [pulseaudio] main.c: Compiled with Valgrind support: no
D: [pulseaudio] main.c: Running in valgrind mode: no
D: [pulseaudio] main.c: Running in VM: no
D: [pulseaudio] main.c: Optimized build: no
D: [pulseaudio] main.c: FASTPATH defined, only fast path asserts disabled.
I: [pulseaudio] main.c: Machine ID is localhost.
I: [pulseaudio] main.c: Using runtime directory /data/data/jackpal.androidterm/app_HOME/.config/pulse/localhost-runtime.
I: [pulseaudio] main.c: Using state directory /data/data/jackpal.androidterm/app_HOME/.config/pulse.
I: [pulseaudio] main.c: Using modules directory /data/local/pa/lib/pulse-5.0/modules.
I: [pulseaudio] main.c: Running in system mode: no
I: [pulseaudio] main.c: Fresh high-resolution timers available! Bon appetit!
W: [pulseaudio] core.c: failed to allocate shared memory pool. Falling back to a normal memory pool.
D: [pulseaudio] memblock.c: Using private memory pool with 1024 slots of size 64.0 KiB each, total size is 64.0 MiB, maximum usable slot size is 65496
I: [pulseaudio] cpu-arm.c: CPU flags: V6 V7 VFP EDSP NEON VFPV3
I: [pulseaudio] sconv_neon.c: Initialising ARM NEON optimized conversions.
I: [pulseaudio] mix_neon.c: Initialising ARM NEON optimized mixing functions.
I: [pulseaudio] remap_neon.c: Initialising ARM NEON optimized remappers.
E: [pulseaudio] module.c: Failed to open module "module-cli".
E: [pulseaudio] main.c: Module load failed.
E: [pulseaudio] main.c: Failed to initialize daemon.
I: [pulseaudio] main.c: Daemon terminated.
다음 매개변수를 사용하여 PA를 구성합니다.
./configure --prefix="/data/local/pa" --host arm-linux-androideabi --enable-neon-opt --with-sysroot='/data/local/pa' --without-caps --disable-shared --enable-static --disable-avahi --disable-alsa --disable-jack --disable-gconf --disable-esound --disable-openssl --disable-dbus --disable-glib2 --disable-orc --disable-adrian-aec --disable-rpath --enable-static-bins --disable-ipv6 --enable-force-preopen
올바른 모듈 디렉터리를 보고하더라도 해당 모듈을 찾을 수 없는 이유는 무엇입니까?
답변1
PulseAudio의 버그로 인해 모듈이 (정적 라이브러리로) 잘못 빌드되어 로드할 수 없게 되었습니다. 성공 하지 않고 재구성되었습니다 --disable-shared --enable-static --enable-static-bins
:)
답변2
내 서버 버전을 사용할 수 있습니다.https://github.com/twaik/pulseaudio-sles-ndk. Android NDK를 사용하여 빌드하기로 결정했습니다.