Playing multiple wav files using ALSA in C with different volumes

℡╲_俬逩灬. 提交于 2019-12-24 08:19:57

问题


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


回答1:


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



来源:https://stackoverflow.com/questions/14713741/playing-multiple-wav-files-using-alsa-in-c-with-different-volumes

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!