Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

多用户使用问题 #83

Open
iamzhuang opened this issue Sep 2, 2024 · 1 comment
Open

多用户使用问题 #83

iamzhuang opened this issue Sep 2, 2024 · 1 comment

Comments

@iamzhuang
Copy link

你好,我在ubuntu22.04下,使用
sudo ekho "hello"
提示如下错误

pa_simple_new() failed: Connection refused
pa_sample_spec(format=3,rate=22050,channels=)
Assertion 'p' failed at ../src/pulse/simple.c:273, function pa_simple_write(). Aborting.

或者我在系统自启一个程序,程序里面调用了system("/usr/local/bin/ekho hello");函数,会抢占了正常系统下的音频设备。导致音频设备不用使用。
请问有什么方法使多个用户使用吗?自启动的程序调用ekho也可以用的方法。

@hgneng
Copy link
Owner

hgneng commented Sep 3, 2024

问题似乎并非“抢占”引起的,而是root用户没有启用音频服务(root用户并不能使用以普通用户身份启用的pulseaudio服务)。

可以参考:

我自己试过运行sudo pulseaudio -D --system后可以解决。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants