通过SSH的ALSA(snd_pcm_open)吗? [英] ALSA (snd_pcm_open) over SSH?

查看:325
本文介绍了通过SSH的ALSA(snd_pcm_open)吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用ALSA(snd_pcm_open,snd_pcm_readi等)编写了一个应用程序.该应用程序在我的机器上本地完美运行.但是,当我SSH到另一台计算机并通过SSH连接运行它时,所有对snd_pcm_open的调用均失败,并显示消息设备不存在"或类似信息.远程计算机与本地计算机一样具有声卡.

I have written an application using ALSA (snd_pcm_open, snd_pcm_readi, etc). The application works perfect locally on my machine. However, when I SSH to another machine and run it through the SSH connection, all calls to snd_pcm_open fails with a message "Device does not exist" or similar. The remote machine has a soundcard just as my local machine has.

这里可能是什么问题?

谢谢!

如果我使用远程计算机上的控制台运行该应用程序(转到计算机,登录,运行该应用程序),则该应用程序运行良好.

If I run the application using the console on the remote computer (walk to the computer, login, run the application), the application runs fine.

推荐答案

找到了原因.结果显示/dev/audio/dev/snd/以下的设备均由用户所有,并已在远程计算机上登录,并且其他任何人都无法读取/写入.为了进行测试,我应用了chmod 777 /dev/audio /dev/snd/*,它开始工作.

Found the reason. Turns out /dev/audio and the devices below /dev/snd/ where all owned by the user logged in on the remote computer, and readable/writable by no one else. For testing I applied chmod 777 /dev/audio /dev/snd/* and it started working.

任何人都知道如何对远程计算机的音频设备(在重新启动后将持续使用)施加更大的权限吗?

Anyone know how I can apply a bit more generous permissions to the audio devices for the remote computer (which will last after a reboot)?

这篇关于通过SSH的ALSA(snd_pcm_open)吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆