播放使用ALSA多个WAV文件,用C具有不同的卷 [英] Playing multiple wav files using ALSA in C with different volumes

查看:291
本文介绍了播放使用ALSA多个WAV文件,用C具有不同的卷的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用ALSA库C接口播放超过2 wav文件。每个文件应该以不同体积上播放,但它应该能够同时播放它们。我使用与SGTL5000设备板嵌入式linux。我得到播放设备pcm0p只有一个​​条目。请让我知道怎么玩多种声音与不同的卷在一起。请让我知道如果你需要更多的细节。
 在此先感谢

I need to play more than 2 wav files using ALSA library C interface. Each file should be played with different volumes but it should be possible to play them simultaneously. I am using embedded linux on a board with sgtl5000 device. I get only one entry for playback device as pcm0p. Please let me know how to play multiple sounds together with different volumes. Please let me know if you require more details. Thanks in advance

推荐答案

如果该ALSA库已编制与 DMIX 插件,只需打开指定的设备插件:DMIX 为每个文件

If the ALSA library has been compiled with the dmix plugin, just open the device named plug:dmix for each file.

这篇关于播放使用ALSA多个WAV文件,用C具有不同的卷的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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