linux - 有没有一种方法可以确定 Linux 中的音频 channel 布局?

标签 linux audio channel alsa

我正在为 Linux 制作一个播放器,我想知道用户系统的音频 channel 布局(立体声、5.1 声道等)(不是媒体文件中包含的 channel )。 目前,它是由用户设置的,但我想实现 channel 布局的自动检测。

是否有任何(事实上的)标准方法来完成此操作? 如果没有,我至少可以找到 ALSA 的解决方案吗?

最佳答案

在 ALSA 中,默认 设备通常只支持立体声。 您可以尝试打开名为 frontsurround40surround51surround71 的设备,但这些设备不会具有自动样本格式转换或软件混合。

最好的办法是使用 PulseAudio,并向服务器询问接收器的 channel 映射。

关于linux - 有没有一种方法可以确定 Linux 中的音频 channel 布局?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27719010/

相关文章:

go - 停止阻塞的 goroutine

go - golang 中的事件驱动模式

go - channel 数组

android - 在Ubuntu中安装Android Studio : Unable to run mksdcard SDK tool

linux - 没有中央存储库的 Git 是一个很好的工作流程吗?

javax.sound.sampled.Clip 不播放

ios - 背景音频无法与Xcode 7一起使用

linux - Git,致命的 : unable to access 'https://github.com/path/to/repo.git' : gnutls_handshake() failed: Error in the pull function

c - 构建交叉编译器 : Intel Xeon E5649 >>> ARMv7 with libcURL

reactjs - 在reactJS中使用getusermedia媒体设备来录制音频