QSound no voice
Unsolved
Mobile and Embedded
-
Hi
I want to play some music or other sound data(with different sample) on the device. So I useQSound
andQAudioOutput
,right?
On PC, it works; but on the device ,it does work
First ,it showPulseAudioService: pa_context_connect() failed
,
whenpulseaudio -vvvv
, it shows:module-console-kit.c: GetSessionsForUnixUser() call failed: org.freedesktop.DBus.Error.Spawn.PermissionsInvalid: The permission of the setuid helper is not correct E: [pulseaudio] module.c: Failed to load module "module-console-kit" (argument: ""): initialization failed. E: [pulseaudio] main.c: Module load failed. E: [pulseaudio] main.c: Failed to initialize daemon.
when
pulseaudio -vvvv --system
, it shows:W: [pulseaudio] main.c: Running in system mode, but --disallow-exit not set. W: [pulseaudio] main.c: Running in system mode, but --disallow-module-loading not set. N: [pulseaudio] main.c: Running in system mode, forcibly disabling SHM mode. D: [pulseaudio] core-rtclock.c: Timer slack is set to 50 us. D: [pulseaudio] core-util.c: setpriority() worked. I: [pulseaudio] core-util.c: Successfully gained nice level -11. I: [pulseaudio] main.c: Found user 'pulse' (UID 995) and group 'pulse' (GID 1001). I: [pulseaudio] main.c: Successfully changed user to "pulse". I: [pulseaudio] main.c: This is PulseAudio 8.0 D: [pulseaudio] main.c: Compilation host: arm-poky-linux-gnueabi D: [pulseaudio] main.c: Compilation CFLAGS: -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/data/fsl-release-bsp/build-x11/tmp/work/cortexa9hf-neon-mx6qdl-poky-linux-gnueabi/pulseaudio/8.0-r0=/usr/src/debug/pulseaudio/8.0-r0 -fdebug-prefix-map=/data/fsl-release-bsp/build-x11/tmp/sysroots/x86_64-linux= -fdebug-prefix-map=/data/fsl-release-bsp/build-x11/tmp/sysroots/imx6qsabresd= -Wall -W -Wextra -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 -fdiagnostics-color=auto D: [pulseaudio] main.c: Running on host: Linux armv7l 4.1.15 #91 SMP PREEMPT Thu Jan 16 18:42:26 CST 2020 D: [pulseaudio] main.c: Found 2 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: yes D: [pulseaudio] main.c: FASTPATH defined, only fast path asserts disabled. I: [pulseaudio] main.c: Machine ID is 53e0cc24de8da7d251b035b95948f2c7. I: [pulseaudio] main.c: Using runtime directory /var/run/pulse. I: [pulseaudio] main.c: Using state directory /var/lib/pulse. I: [pulseaudio] main.c: Using modules directory /usr/lib/pulse-8.0/modules. I: [pulseaudio] main.c: Running in system mode: yes W: [pulseaudio] main.c: OK, so you are running PA in system mode. Please note that you most likely shouldn't be doing that. W: [pulseaudio] main.c: If you do it nonetheless then it's your own fault if things don't work as expected. W: [pulseaudio] main.c: Please read http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/WhatIsWrongWithSystemWide/ for an explanation why system mode is usually a bad idea. E: [pulseaudio] pid.c: Daemon already running. E: [pulseaudio] main.c: pa_pid_file_create() failed.
This is an embedded device, so I
I fix it with
pulseaudio -D --system
,then I run the test project again, it runs without debug output and voice.
But when I usemplayer
to play it, it works!However, when I use
paplay -d alsa_output.platform-sound.analog-mono /home/root/fileh.wav -v
to play, it shows:Opening a playback stream with sample specification 's16le 1ch 8000Hz' and channel map 'mono'. Connection failure: Access denied
what shuold I do
Regards
Mihan