设置 ALSA 流的音量
我需要能够设置 ALSA 流的音量(来自 PCM 接口的 snd_pcm_t)。这是一个常见的操作,我不明白为什么没有简单的方法?我该怎么做?流衰减数据不是一个选项,因为这会导致音量调整不稳定,因为数据被缓冲。在 DirectSound 和 WinMM 中,这是一个简单的函数调用。我错过了什么吗?我应该使用混音器接口吗?控制接口?我发现 snd_pcm_t 和控制接口之间没有任何联系。我使用了错误的 API 吗?
I need to be able to set the volume of my ALSA stream (snd_pcm_t from the PCM Interface). This is a common operation and i don't understand why there is no easy way? How can i do this? Streaming attenuated data is not an option since this will cause choppy volume adjustments because data is buffered. In DirectSound and WinMM it's a simple function call. Have i missed something? Should i use the mixer interface? The control interface? I see no connection between snd_pcm_t and the control interface. Am i using the wrong API?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我正在移植到 PulseAudio,似乎性能良好并且有更好的文档。
I am porting to PulseAudio instead, seems to be well performing and has better documentation.