简体   繁体   English

在centOS 6.x中播放音频时未找到/ dev / dsp错误

[英]/dev/dsp not found error while audio playback in centOS 6.x

I am trying develop an application using C++ which will record audio data from mic and will playback the data. 我正在尝试使用C ++开发一个应用程序,它将从麦克风录制音频数据并播放数据。 But while trying audio capture I am getting following error message. 但在尝试音频捕获时,我收到以下错误消息。

cannot open /dev/dsp

Can anyone advise me on this? 任何人都可以告诉我这个吗?

As far as I know /dev/dsp has been obsoleted. 据我所知/ / dev / dsp已被淘汰。 Latest CentOS uses ALSA(Advance Linux Sound Architecture) instead of that. 最新的CentOS使用ALSA(Advance Linux Sound Architecture)代替。 You can check the implementation of pulse audio . 您可以检查脉冲音频的实现。 I have used the code from the given link to develop an application similar to yours. 我使用了给定链接中的代码来开发类似于您的应用程序。 Hope it will help you. 希望它会对你有所帮助。

older softwares like dosemu , some (VERY) old ham softwares actually require /dev/dsp be present.There is a package or config that you are missing. 像dosemu这样的旧软件,一些(非常)旧的火腿软件实际上需要/ dev / dsp存在。有一个你缺少的包或配置。 Googling for it might help, I forget the exact page that I found the solution on.This applies to fedora and most modern debian based distros as well. 谷歌搜索它可能会有所帮助,我忘记了我找到解决方案的确切页面。这适用于fedora和大多数现代的基于debian的发行版。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM