在Linux下C ++音频采集API最佳实践? [英] Best practice for C++ audio capture API under Linux?

查看:2010
本文介绍了在Linux下C ++音频采集API最佳实践?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要创建与麦克风功能的简单录音C ++应用程序。

I need to create a C++ application with a simple audio recording from microphone functionality.

我不能说,没有足够的音频API来做到这一点!脉冲,ALSA中,/ dev / DSP,OpenAL的,等我的问题是什么是当前的最佳实践API?

I can't say that there aren't enough audio APIs to do this! Pulse, ALSA, /dev/dsp, OpenAL, etc. My question is what is the current "Best practice" API?

脉冲似乎被大多数现代发行版的支持,但似乎这个几乎没有文档。
将OpenAL的不同发行版的支持,还是太模糊?
我错过了没有?结果
有没有一个简单的答案?

Pulse seems supported by most modern distros, but seems almost devoid of documentation. Will OpenAL be supported across different distros, or is it too obscure? Have I missed any?
Is there not a simple answer?

推荐答案

伦纳特慢条斯理地在这里有一个指南:


Lennart Pottering has a guide here:

http://0pointer.de/blog/projects/guide-to-健全的API

基本上使用ALSA的安全子集,那么其他所有重要的应该工作了。

basically use the 'safe' subset of alsa then all the other important ones should work too.

除了上述的OpenAL在Linux

Barring that OpenAL works on Linux

编辑:
也有使用PulseAudio相当不错的doxygen生成这里文档和一些其他的东西的此处和一些工具,都是很好的例子,你可以看到他们的GitWeb <一个href=\"http://git.0pointer.de/?p=pulseaudio.git;a=tree;f=src/utils;h=2c29bf259e970394b3e78dc4551ee2e8ee25c64d;hb=06327b1e67af661cb3d73598e6f5f51e475e7ce6\"相对=nofollow>这里

Also pulseaudio has reasonably good doxygen generated documentation here and some other stuff here and some of the utilities are good examples, you can see them in gitweb here

此外,我已经写了采用脉冲音频输入,你可以看看它的这里,但是我不知道我完全正确处理好一切,我知道我错过了code来处理某些情况下......但应该让你开始你应该去脉

Also I've written some code that uses pulse for audio input you can look at it here, however I'm not sure I handle everything totally correctly, and I know I'm missing code to handle certain situations... but that should get you started should you go with pulse.

这篇关于在Linux下C ++音频采集API最佳实践?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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